public int Save(TrainingDetails request)
 {
     try
     {
         request.IsActive  = true;
         request.CreatedBy = "System";
         request.CreatedOn = DateTime.Now;
         _context.Add(request);
         int val = _context.SaveChanges();
         return(request.Id);
     }
     catch (Exception ex)
     {
         return(-1);
     }
 }
Beispiel #2
0
 public void Save()
 {
     context.SaveChanges();
     //Context.SaveChanges_Auditable();
 }