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

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

            using (CloudModel context = new CloudModel())
            {
                cat = context.FileBase.ToList();
            }
            return(cat);
        }
예제 #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();
            }
        }
예제 #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);
        }
예제 #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();
            }
        }
예제 #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);
        }