public async Task <bool> Delete(ServiceLocationContact entity) { try { _dbContext.ServiceLocationContacts.Remove(entity); await _dbContext.SaveChangesAsync(); return(true); } catch (Exception e) { return(false); } }
public async Task <int> Insert(ServiceLocationContact entity) { try { await _dbContext.ServiceLocationContacts.AddAsync(entity); await _dbContext.SaveChangesAsync(); return(entity.ServiceLocationContactId); } catch (Exception e) { return(0); } }