Exemple #1
0
 public void Update(Userr product)
 {
     using (CloudModel context = new CloudModel())
     {
         context.Entry(product).State = EntityState.Modified;
     }
 }
Exemple #2
0
 public void Create(Userr userr)
 {
     using (CloudModel context = new CloudModel())
     {
         context.Userr.Add(userr);
         context.SaveChanges();
     }
 }
Exemple #3
0
 public void Create(FileBase userr)
 {
     using (CloudModel context = new CloudModel())
     {
         context.FileBase.Add(userr);
         context.SaveChanges();
     }
 }
Exemple #4
0
        public List <Userr> SelectAll()
        {
            List <Userr> cat;

            using (CloudModel context = new CloudModel())
            {
                cat = context.Userr.ToList();
            }
            return(cat);
        }
Exemple #5
0
        public List <FileBase> SelectAll()
        {
            List <FileBase> cat;

            using (CloudModel context = new CloudModel())
            {
                cat = context.FileBase.ToList();
            }
            return(cat);
        }
Exemple #6
0
        public void Delete(int id)
        {
            Userr result = new Userr();

            using (CloudModel context = new CloudModel())
            {
                List <Userr> temp = context.Userr.ToList();
                for (int i = 0; i < temp.Count; i++)
                {
                    if (temp[i].Id == id)
                    {
                        context.Userr.Remove(temp[i]);
                    }
                }
                context.SaveChanges();
            }
        }
Exemple #7
0
        public Userr Select(int id)
        {
            Userr result = new Userr();

            using (CloudModel context = new CloudModel())
            {
                List <Userr> temp = context.Userr.ToList();
                for (int i = 0; i < temp.Count; i++)
                {
                    if (temp[i].Id == id)
                    {
                        result = temp[i];
                    }
                }
            }
            return(result);
        }
Exemple #8
0
        public void Delete(int id)
        {
            FileBase result = new FileBase();

            using (CloudModel context = new CloudModel())
            {
                List <FileBase> temp = context.FileBase.ToList();
                for (int i = 0; i < temp.Count; i++)
                {
                    if (temp[i].Id == id)
                    {
                        context.FileBase.Remove(temp[i]);
                    }
                }
                context.SaveChanges();
            }
        }
Exemple #9
0
        public FileBase Select(int id)
        {
            FileBase result = new FileBase();

            using (CloudModel context = new CloudModel())
            {
                List <FileBase> temp = context.FileBase.ToList();
                for (int i = 0; i < temp.Count; i++)
                {
                    if (temp[i].Id == id)
                    {
                        result = temp[i];
                    }
                }
            }
            return(result);
        }