public AppSocialAddress Update(AppSocialAddress data) { var item = _repository.AppSocialAddresses.Attach(data); item.State = Microsoft.EntityFrameworkCore.EntityState.Modified; _repository.SaveChanges(); return(data); }
public async Task <AppSocialAddress> Delete(int id) { AppSocialAddress item = await _repository.AppSocialAddresses.FindAsync(id); if (item != null) { _repository.AppSocialAddresses.Remove(item); _repository.SaveChanges(); } return(item); }
public AppSocialAddress Add(AppSocialAddress data) { _repository.AppSocialAddresses.Add(data); _repository.SaveChanges(); return(data); }