Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }