public bool Update(Depot obj)
        {
            //var obj = Db.Set<TEntity>().Find(id);
            // Db.Entry(obj).State = EntityState.Modified;
            //if (Db.SaveChanges() > 0)
            //{
            //    return true;
            //}
            //else
            //{
            //    return false;
            //}
            try
            {
                using (var dbCtx = new ApplicationDbContext())
                {
                    //3. Mark entity as modified
                    dbCtx.Entry(obj).State = System.Data.Entity.EntityState.Modified;

                    //4. call SaveChanges
                    dbCtx.SaveChanges();
                }
            }
            catch
            {
                return(false);
            }
            return(true);
        }
 public bool Add(Depot obj)
 {
     Db.Set <Depot>().Add(obj);
     if (Db.SaveChanges() > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }