Ejemplo n.º 1
0
        /// <summary>
        /// Get House with minimum water value
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public GetHouseWithMinWCResponse GetHouseWithMinWC(GetHouseWithMinWCRequest request)
        {
            using (var context = GetContext())
            {
                var house = context.House
                            .OrderBy(h => h.WaterCounter.WaterValues)
                            .FirstOrDefault();

                return(new GetHouseWithMinWCResponse()
                {
                    House = HouseConverter.ConvertHouse(house)
                });
            }
        }
Ejemplo n.º 2
0
 public GetHouseWithMinWCResponse GetHouseWithMinWC(GetHouseWithMinWCRequest request)
 {
     return(ServiceHelper.Process(MethodBase.GetCurrentMethod().Name, () => new DatabaseHelper().GetHouseWithMinWC(request)));
 }