Esempio n. 1
0
 public static void AddOkMessage(this string message, AccountingDbContext context)
 {
     context.Messages.Add(new Message()
     {
         Type = MessageType.Ok, Id = message
     });
 }
Esempio n. 2
0
 public static void AddErrorMessage(this string message, AccountingDbContext context, List <ValidationResult> results = null)
 {
     context.Messages.Add(new Message()
     {
         Type = MessageType.Error, Id = message
     });
     if (results != null)
     {
         results.Add(new ValidationResult(message));
     }
 }