//public Client GetClient(string tokenId) //{ // Client client = sheringDBContext.Client.Where(x => x.IdentityId == tokenId).FirstOrDefault(); // return client; //} public void Update(Client client) { sheringDBContext.Entry(client).State = EntityState.Modified; sheringDBContext.SaveChanges(); cache.Remove(client.Id); cache.Set(client.Id, client, new MemoryCacheEntryOptions { AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5) }); }
//public Client GetClient(string tokenId) //{ // Client client = sheringDBContext.Client.Where(x => x.IdentityId == tokenId).FirstOrDefault(); // return client; //} public void Update(WorkplaceOrder workplaceOrder) { sheringDBContext.Entry(workplaceOrder).State = EntityState.Modified; sheringDBContext.SaveChanges(); }
//public Client GetClient(string tokenId) //{ // Client client = sheringDBContext.Client.Where(x => x.IdentityId == tokenId).FirstOrDefault(); // return client; //} public void Update(SearchSetting searchSetting) { sheringDBContext.Entry(searchSetting).State = EntityState.Modified; sheringDBContext.SaveChanges(); }
//public Client GetClient(string tokenId) //{ // Client client = sheringDBContext.Client.Where(x => x.IdentityId == tokenId).FirstOrDefault(); // return client; //} public void Update(WorkplaceParameter workplace) { sheringDBContext.Entry(workplace).State = EntityState.Modified; }
//public Client GetClient(string tokenId) //{ // Client client = sheringDBContext.Client.Where(x => x.IdentityId == tokenId).FirstOrDefault(); // return client; //} public void Update(Equipment equipment) { sheringDBContext.Entry(equipment).State = EntityState.Modified; }
//public Client GetClient(string tokenId) //{ // Client client = sheringDBContext.Client.Where(x => x.IdentityId == tokenId).FirstOrDefault(); // return client; //} public void Update(WorkplaceEquipment workplaceEquipment) { sheringDBContext.Entry(workplaceEquipment).State = EntityState.Modified; }
//public Client GetClient(string tokenId) //{ // Client client = sheringDBContext.Client.Where(x => x.IdentityId == tokenId).FirstOrDefault(); // return client; //} public void Update(Landlord landlord) { sheringDBContext.Entry(landlord).State = EntityState.Modified; }
//public Client GetClient(string tokenId) //{ // Client client = sheringDBContext.Client.Where(x => x.IdentityId == tokenId).FirstOrDefault(); // return client; //} public void Update(Building building) { sheringDBContext.Entry(building).State = EntityState.Modified; }