skip to Main Content

Json conversion of enums to strings

I have the following class: using Newtonsoft.Json; using Newtonsoft.Json.Converters; public class JsonError { [JsonConverter(typeof(StringEnumConverter))] public enum Number { [EnumMember(Value = "0")] Pass, [EnumMember(Value = "1")] Miscalc, [EnumMember(Value = "2")] ReadError } public Number ErrorNumber { get; set; } } And…

VIEW QUESTION

Azure Durable Function IDurableOrchestrationContext.CurrentUtcDateTime Returning Same Date Each Time

I am invoking IDurableOrchestrationContext.CurrentUtcDateTime in my Azure Durable Function. var nextRun = context.CurrentUtcDateTime.AddMinutes(1); await context.CreateTimer(nextRun, CancellationToken.None); context.ContinueAsNew(context.NewGuid().ToString()); When I look in the logs, I am seeing this message from the task hub (FYI - today's date is 2023-09-27): Function 'RunOrchestrator…

VIEW QUESTION

Asp.net – After saving the data to the database once, it does not save the second one

I'm pretty new to this industry. This is the Create method in BaseRepository: public async Task CreateAsync(TEntity entity) { await _db.Set<TEntity>().AddAsync(entity); await _db.SaveChangesAsync(); } This is the Create method inside the UserService class. public ResultService<UserCreateDTO> Create(UserCreateVM userCreateVM) { ResultService<UserCreateDTO> result…

VIEW QUESTION
Back To Top
Search