Ejemplo n.º 1
0
 public async Task DeleteAsync(Guid id, Guid organisationId)
 {
     if (!await ExistsAsync(id, organisationId))
     {
         throw new GreenFieldNotFoundException();
     }
     await _repository.DeleteAsync(id);
 }
Ejemplo n.º 2
0
        public async Task <string> Delete(String id)
        {
            try
            {
                await fieldRepository.DeleteAsync(ObjectId.Parse(id));

                return("Xóa thành công");
            }
            catch (Exception)
            {
                throw new Exception("Xóa thất bại.");
            }
        }