Kringe
Kringe
CC#
Created by Serene Sphinx on 11/11/2024 in #help
Database is not fetching data. Applied everything properly.
brithdate
58 replies
CC#
Created by Serene Sphinx on 11/11/2024 in #help
Database is not fetching data. Applied everything properly.
I just think using things like birthdate for querying users is not what you want
58 replies
CC#
Created by Serene Sphinx on 11/11/2024 in #help
Database is not fetching data. Applied everything properly.
the code you wrote is correct and it will work if the values exist
58 replies
CC#
Created by Serene Sphinx on 11/11/2024 in #help
Database is not fetching data. Applied everything properly.
so what is the meaning of account number then if its not a unique value
58 replies
CC#
Created by Serene Sphinx on 11/11/2024 in #help
Database is not fetching data. Applied everything properly.
can u use that in your dto
58 replies
CC#
Created by Serene Sphinx on 11/11/2024 in #help
Database is not fetching data. Applied everything properly.
well if account number is a unique value use that for fetching and make sure it exists in db
58 replies
CC#
Created by Serene Sphinx on 11/11/2024 in #help
Database is not fetching data. Applied everything properly.
im in vc2
58 replies
CC#
Created by Serene Sphinx on 11/11/2024 in #help
Database is not fetching data. Applied everything properly.
meet ? in vc
58 replies
CC#
Created by Serene Sphinx on 11/11/2024 in #help
Database is not fetching data. Applied everything properly.
Is it then not unnecessary to also check for birthdate and crn
58 replies
CC#
Created by Serene Sphinx on 11/11/2024 in #help
Database is not fetching data. Applied everything properly.
Is account number a unique value?
58 replies
CC#
Created by packetphysicist on 10/7/2024 in #help
Returning Service result to Controller (Minimal API)
Okay ty I see
55 replies
CC#
Created by packetphysicist on 10/7/2024 in #help
Returning Service result to Controller (Minimal API)
if a deletion fails is that not an exception
55 replies
CC#
Created by packetphysicist on 10/7/2024 in #help
Returning Service result to Controller (Minimal API)
why is exceptions frowned upon?
55 replies
CC#
Created by Core on 8/27/2024 in #help
Is there a method that throws an exception if a config value is not present in appsettings?
ty
12 replies
CC#
Created by Core on 8/27/2024 in #help
Is there a method that throws an exception if a config value is not present in appsettings?
ty I will read
12 replies
CC#
Created by Core on 8/27/2024 in #help
Is there a method that throws an exception if a config value is not present in appsettings?
public static string GetRequiredValue(this IConfiguration configuration, string key) =>
configuration[key] ?? throw new InvalidOperationException($"Configuration value for '{key}' is null");

var value = configuration.GetRequiredValue("key");
public static string GetRequiredValue(this IConfiguration configuration, string key) =>
configuration[key] ?? throw new InvalidOperationException($"Configuration value for '{key}' is null");

var value = configuration.GetRequiredValue("key");
12 replies
CC#
Created by Core on 8/27/2024 in #help
Is there a method that throws an exception if a config value is not present in appsettings?
you could make a simple extension method for this
12 replies
CC#
Created by dev1111 on 8/20/2024 in #help
System.Text.Json.JsonException: A possible object cycle was detected
I also saw ReferenceHandler.IgnoreCycles if you don't want the metadata of the referencing
12 replies
CC#
Created by dev1111 on 8/20/2024 in #help
System.Text.Json.JsonException: A possible object cycle was detected
You can also use DTO's or specify a max depth in JsonSerializerOptions
12 replies
CC#
Created by morry329# on 7/10/2024 in #help
Dealing with the professor: advice appreciated
just tell the professors what you just typed out (leave 'the nasty professor.' out)
13 replies