示例#1
0
        public static void SoftDelete(int id)
        {
            SinaicspDataModelContainer _context = new Sinaicsp_API.SinaicspDataModelContainer();
            Inclusion _item = _context.Inclusions.FirstOrDefault(a => a.Id == id);

            _item.IsDeleted = true;
            _context.SaveChanges();
        }
示例#2
0
        public static bool Update(int id, string subject, string classes, string teacher, string sessionStart, string sessionEnd, int LoggeduserId)
        {
            SinaicspDataModelContainer _context = new Sinaicsp_API.SinaicspDataModelContainer();
            Inclusion _item = _context.Inclusions.FirstOrDefault(a => a.Id == id);

            _item.Subject      = subject;
            _item.Classes      = classes;
            _item.Teacher      = teacher;
            _item.SessionStart = sessionStart;
            _item.SessionEnd   = sessionEnd;
            _context.SaveChanges();
            return(true);
        }