public void CreateOrUpdateCreditType(CreditTypeViewModel creditTypeViewModel)
 {
     var entity = AutoMapper.Mapper.Map<CreditTypeViewModel, CreditType>(creditTypeViewModel);
     creditUow.CreditTypes.InsertOrUpdate(entity);
     creditUow.Commit();
     creditTypeViewModel.Id = entity.Id;
 }
 public HttpResponseMessage SaveCreditType(CreditTypeViewModel model)
 {
     var result = ProcessViewModel(model, creditTypeValidationService, creditTypeService.CreateOrUpdateCreditType);
     return Request.CreateResponse(HttpStatusCode.OK, result);
 }