private OpisStanu MapStanToBusinessStan(BusinessServices.OpisStanu stan) { return(new OpisStanu { Id = stan.Id, IloscGier = stan.IloscGier, Stol = (ICollection <Stol>)stan.NumerStolow }); }
public void UpdateState(BusinessServices.OpisStanu state) { using (var ctx = new KasynoContext()) { var record = ctx.OpisStanu.FirstOrDefault(x => x.Id == state.Id); if (record == null) { return; } record.IloscGier = state.IloscGier; record.Stol = (ICollection <Stol>)state.NumerStolow; ctx.SaveChanges(); } }