public IActionResult Get(int id)
        {
            var ClasssResponse = _ClasssService.GetClasssById(id);

            if (ClasssResponse.IsSucceeded && ClasssResponse.Result != null)
            {
                return(Ok(ClasssResponse.Result));
            }
            return(ClasssResponse.HttpGetResponse());
        }
Esempio n. 2
0
 public ActionResult ClassEdit(int ClassId)
 {
     try
     {
         var model = new ClassModel
         {
             Classs = ClassId == 0 ? new Core3Base.Infra.Data.Entity.Classs
             {
                 IsActive = true,
                 Id       = 0
             } : _classService.GetClasssById(ClassId).Result,
         };
         return(View(model));
     }
     catch (Exception e)
     {
         return(View(new StudentModel()));
     }
 }