public Result <ClassDTO> CreateClass(ClassDTO model) { try { var check = userDAL.Get(w => w.ID == model.UserID && w.UserType == Entity.Concrete.UserType.Teacher); if (check == null) { return(new Result <ClassDTO>(false, "boyle bir egitmen yok", null)); } Class_ class_ = model.Adapt <Class_>(); classDAL.Add(class_); return(new Result <ClassDTO>(false, "islem basarili sekilde tamamlanmistir", null)); } catch (Exception ex) { return(new Result <ClassDTO>(true, ex.Message, null)); } }