コード例 #1
0
        public void DeleteProject(int id)
        {
            PROJECT project = _context.PROJECT.Find(id);

            _context.PROJECT.Remove(project);
            _context.SaveChanges();
        }
コード例 #2
0
        public long UpdateAddProject(PROJECT project)
        {
            int result = -1;

            if (project != null)
            {
                _context.Entry(project).State = EntityState.Modified;
                _context.SaveChanges();
                result = project.PROJECT_ID;
            }
            return(result);
        }
コード例 #3
0
        public long AddProject(PROJECT project)
        {
            int result = -1;

            if (project != null)
            {
                _context.PROJECT.Add(project);
                _context.SaveChanges();
                result = project.PROJECT_ID;
            }
            return(result);
        }