Exemplo n.º 1
0
 public void DeleteLMAllocation(int employeeid, int lmid)
 {
     try
     {
         LMAllocation lmallocation = new LMAllocation() { LMID = lmid, ManageeId = employeeid };
         context.LMAllocations.DeleteObject(lmallocation);
         context.SaveChanges();
     }
     catch (Exception ex)
     {
         //Include catch blocks for specific exceptions first,
         //and handle or log the error as appropriate in each.
         //Include a generic catch block like this one last.
         throw ex;
     }
 }
Exemplo n.º 2
0
 public void InsertLMAllocation(LMAllocation lmallocation)
 {
     try
     {
         context.LMAllocations.AddObject(lmallocation);
         context.SaveChanges();
     }
     catch (Exception ex)
     {
         //Include catch blocks for specific exceptions first,
         //and handle or log the error as appropriate in each.
         //Include a generic catch block like this one last.
         throw ex;
     }
 }