/*Returns one Listing*/
 public Listing Read(int id)
 {
     using (var db = new ListPlusEntities())
     {
         return db.Listings.Find(id);
     }
 }
 /*Returns all Listings*/
 public List<Listing> List()
 {
     using (var db = new ListPlusEntities())
     {
         return db.Listings.ToList();
     }
 }
 /*Adds Listing*/
 public void Add(Listing listing)
 {
     using (var db = new ListPlusEntities())
     {
         db.Listings.Add(listing);
         db.SaveChanges();
     }
 }
 /*Updates Listing*/
 public void Update(Listing listing)
 {
     using (var db = new ListPlusEntities())
     {
         db.Listings.Attach(listing);
         db.Entry(listing).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
 /*Deletes Listing*/
 public void Delete(Listing listing)
 {
     using (var db = new ListPlusEntities())
     {
         var lst = db.Listings.Find(listing.Id);
         db.Listings.Remove(lst);
         db.SaveChanges();
     }
 }