コード例 #1
0
        public bool UpdateDepartment(int Id, TB_M_Department Department)
        {
            var Get = get(Id);

            if (Get != null)
            {
                Get.Name = Department.Name;
                myContext.Entry(Get).State = EntityState.Modified;
                return(savedata.Save(myContext));
            }
            else
            {
                status = false;
            }
            return(status);
        }
コード例 #2
0
 public bool InsertDepartment(TB_M_Department Department)
 {
     myContext.TB_M_Departments.Add(Department);
     return(savedata.Save(myContext));
 }