public void Create(EmployeePositionTimeOffPolicy item)
 {
     using (var transaction = dbContext.Database.BeginTransaction())
     {
         try
         {
             dbContext.Set <EmployeePositionTimeOffPolicy>().Add(item);
             dbContext.SaveChanges();
             transaction.Commit();
         }
         catch (Exception ex)
         {
             transaction.Rollback();
         }
     }
 }
Ejemplo n.º 2
0
 public BasicRepository(TOTDBContext context)
 {
     set = context.Set <T>();
 }
 public TimeOffRequestRepository(TOTDBContext context)
 {
     set = context.Set <TimeOffRequest>();
 }
 public TimeOffRequestApprovalRepository(TOTDBContext context)
 {
     set = context.Set <TimeOffRequestApproval>();
 }
 public void Create(TimeOffPolicy item)
 {
     dbContext.Set <TimeOffPolicy>().Add(item);
 }
 public void Create(TimeOffPolicyApprover item)
 {
     dbContext.Set <TimeOffPolicyApprover>().Add(item);
 }