Ejemplo n.º 1
0
        public async Task <IActionResult> Create(PeriodModel model)
        {
            var username = ApplicationUtility.GetTokenAttribute(Request.Headers["Authorization"], "sub");
            var service  = new PeriodRepository(connString);
            await service.CreatePeriod(model);

            var response = new GenericResponse <string>()
            {
                IsSuccess    = true,
                Message      = "Period created successfully.",
                ResponseCode = 200,
                Result       = "Success"
            };

            return(Ok(response));
        }