public RatingTypeContract CreateRatingType(RatingTypeContract contract) { try { using (var context = new MovieShelfEntities(ConfigurationManager.ConnectionStrings["TestConnection"].ConnectionString)) { var provider = new RatingTypeDal(context); var process = new RatingTypeProcess(provider); var service = new RatingTypeService(process); var result = service.Create(new RatingType(contract)); var returnResult = new RatingType().ConvertToContract(result, new RatingTypeContract()); return returnResult; } } catch (Exception exception) { return HandleExceptionResponse<RatingType, RatingTypeContract>(exception); } }