/// <summary> /// ___Add Implicit Action___ /// </summary> /// <param name="obj"></param> /// <returns></returns> public async Task Add(BookingAction obj) { if (!IsExist(obj)) { await _service.BookingActions.AddAsync(obj); await _service.SaveChangesAsync(); } }
public virtual async Task Add(T obj) { if (!_service.Set <T>().Any(x => x.Id == obj.Id)) { await _service.Set <T>().AddAsync(obj); await _service.SaveChangesAsync(); } }
public async override Task Add(Permission obj) { if (!_service.Permissions.Any(x => x.KeyId == obj.KeyId || x.Key.AudNum == obj.Key.AudNum)) { await _service.Permissions.AddAsync(obj); await _service.SaveChangesAsync(); return; } throw new KeyAlreadyExist(obj.Key.AudNum); }
public async Task UpdateImage(Image UserImage) { await _context.AddAsync(UserImage); await _context.SaveChangesAsync(); }
public async Task CreateAsync(Employee employee) { _context.Add(employee); await _context.SaveChangesAsync(); }