Example #1
0
 public List <ViewPaymankarReshte> SearchPaymankaranMojaz(string ReshteIds, string Conditions, int IDZirProje)
 {
     using (var myen = new AbyariEntities())
     {
         System.Data.Entity.Core.Objects.ObjectResult <ViewPaymankarReshte> res = myen.ListOfPaymankaranMojaz(ReshteIds, Conditions, IDZirProje);
         if (res != null)
         {
             return(res.ToList <ViewPaymankarReshte>());
         }
         return(null);
     }
 }
Example #2
0
 public List <Reshte> GetAllReshte(string[] includes)
 {
     using (var myen = new AbyariEntities())
     {
         var reshte = myen.Reshtes.AsQueryable();
         if (includes != null)
         {
             foreach (string inc in includes)
             {
                 reshte = reshte.Include(inc);
             }
         }
         return(reshte.ToList <Reshte>());
     }
 }
Example #3
0
 public List <Sherkat> GetAllSherkats(string[] includes)
 {
     using (var myen = new AbyariEntities())
     {
         IQueryable <Sherkat> _sherkats = myen.Sherkats.AsQueryable();
         if (includes != null)
         {
             foreach (string inc in includes)
             {
                 _sherkats = _sherkats.Include(inc);
             }
         }
         return(_sherkats.ToList());
     }
 }
Example #4
0
 public ZirProje GetZirProjeByCodeIncludes(int id, string[] includes)
 {
     using (var myen = new AbyariEntities())
     {
         var zirproje = myen.ZirProjes.AsQueryable();
         if (includes != null)
         {
             foreach (string inc in includes)
             {
                 zirproje = zirproje.Include(inc);
             }
         }
         return(zirproje.AsNoTracking().Where(x => x.ID == id).FirstOrDefault() ?? new ZirProje()
         {
             ID = -1
         });
     }
 }