public async Task <int> Update(ClientAllowedGrantTypes clientAllowedGrantTypes) { var info = await GetInfo(clientAllowedGrantTypes.Id); if (info == null) { return(-1); } info.AllowedGrantType = clientAllowedGrantTypes.AllowedGrantType; return(await Context.SaveChangesAsync()); }
public async Task <int> Insert(ClientAllowedGrantTypes clientAllowedGrantTypes) { var isExists = await CheckExists(clientAllowedGrantTypes.ClientId, clientAllowedGrantTypes.AllowedGrantType); if (isExists) { return(-1); } _clientAllowedGrantTypeRepository.Create(clientAllowedGrantTypes); return(await Context.SaveChangesAsync()); }