Пример #1
0
        public string getRequestTitle(int itemID)
        {
            string title;

            using (var context = new Outa.Models.ApplicationDbContext())
            {
                Request request = context.Requests.Find(itemID);
                title = request.Title;
            }
            return(title);
        }
Пример #2
0
        public int getOfferCount(int itemID)
        {
            int numOffers;

            using (var context = new Outa.Models.ApplicationDbContext())
            {
                var q     = String.Format("SELECT * FROM dbo.Offer WHERE o_Parent = {0}", itemID);
                var count = context.Offers.SqlQuery(q).ToList();
                numOffers = count.Count;
            }
            return(numOffers);
        }
Пример #3
0
 public string getRequestTitle(int itemID)
 {
     string title;
     using (var context = new Outa.Models.ApplicationDbContext())
     {
         Request request = context.Requests.Find(itemID);
         title = request.Title;
     }
     return title;
 }
Пример #4
0
 public int getOfferCount(int itemID)
 {
     int numOffers;
     using (var context = new Outa.Models.ApplicationDbContext())
     {
         var q = String.Format("SELECT * FROM dbo.Offer WHERE o_Parent = {0}", itemID);
         var count = context.Offers.SqlQuery(q).ToList();
         numOffers = count.Count;
     }
     return numOffers;
 }