public ServiceResponse<PriceModel> SavePrice(PriceModel entity) { Func<PriceModel> func = delegate { entity.HistoryDate = DateTime.Now; return this.context.Save(entity); }; return this.Execute(func); }
public ServiceResponse<PriceModel> GetCurrentPrice(PriceModel entity) { Func<PriceModel> func = delegate { return this.context.AsQueryable<PriceModel>().OrderBy(ph => ph.HistoryDate).First(); }; return this.Execute(func); }