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

            };
            return this.Execute(func);
        }