public void Update(Spectacle spectacle) { var dbEntity = mContext.Spectacles.Find(spectacle.Id); if (dbEntity != null) mContext.Entry(dbEntity).CurrentValues.SetValues(spectacle); }
public void Add(Spectacle spectacle) { spectacle.Id = Guid.NewGuid(); mContext.Spectacles.Add(spectacle); }