public async Task <IActionResult> DeleteSessionMaster(SessionMaster SessionMaster)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(BadRequest(ModelState));
                }
                var result = await _masterRepository.DeleteSessionMaster(SessionMaster);

                return(new OkResult());
            }
            catch (Exception ex)
            {
                ErrorLog.WriteToFile("Master/DeleteSessionMaster", ex);
                return(BadRequest(ex.Message));
            }
        }
        public async Task <IActionResult> CreateSessionMaster(SessionMaster SessionMaster)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(BadRequest(ModelState));
                }
                else
                {
                    var result = await _masterRepository.CreateSessionMaster(SessionMaster);

                    return(Ok(result));
                }
            }
            catch (Exception ex)
            {
                ErrorLog.WriteToFile("Master/CreateSessionMaster", ex);
                return(BadRequest(ex.Message));
            }
        }
Beispiel #3
0
 public SessionController(SessionMaster sessionMaster, SessionData sessionData)
 {
     this.sessionMaster = sessionMaster;
     this.sessionData   = sessionData;
 }