Example #1
0
 /// <summary>
 /// This method removes and existing Players from the DbContext and saves it
 /// </summary>
 /// <param name="Players"></param>
 /// <returns></returns>
 public async Task DeletePointsAdjustmentAsync(PointsAdjustment PointsAdjustment)
 {
     try
     {
         dbContext.PointsAdjustment.Remove(PointsAdjustment);
         await dbContext.SaveChangesAsync();
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #2
0
 /// <summary>
 /// This method add a new Players to the DbContext and saves it
 /// </summary>
 /// <param name="Players"></param>
 /// <returns></returns>
 public async Task <PointsAdjustment> AddPointsAdjustmentAsync(PointsAdjustment PointsAdjustment)
 {
     try
     {
         dbContext.PointsAdjustment.Add(PointsAdjustment);
         await dbContext.SaveChangesAsync();
     }
     catch (Exception)
     {
         throw;
     }
     return(PointsAdjustment);
 }