Exemplo n.º 1
0
 public async Task <ResponseModel> NotResolveServiceCall(ServiceCallModel objInput)
 {
     try
     {
         return(new ResponseModel {
             Status = HttpStatusCode.OK, Success = ""
         });
     }
     catch (System.Exception ex)
     {
         return(new ResponseModel {
             Status = HttpStatusCode.InternalServerError, Errors = new[] { "Exception:" + ex.Message }
         });
     }
 }
Exemplo n.º 2
0
        public async Task <ResponseModel> CreateServiceCall(ServiceCallModel objInput)
        {
            try
            {
                var scObj = _mapper.Map <SME.ServiceAPI.Common.Entities.ServiceCall>(objInput);

                await _repository.Create <SME.ServiceAPI.Common.Entities.ServiceCall>(scObj);

                await _unitofWork.SaveChangesAsync();

                return(new ResponseModel {
                    Status = HttpStatusCode.OK, Success = ""
                });
            }
            catch (System.Exception ex)
            {
                return(new ResponseModel {
                    Status = HttpStatusCode.InternalServerError, Errors = new[] { "Exception:" + ex.Message }
                });
            }
        }