public IDataResult <List <ModelDetailDto> > GetAllModelDetails() { var result = _modelDal.GetAllModelDetails(); if (result.Count() > 0) { return(new SuccessDataResult <List <ModelDetailDto> >(result)); } return(new ErrorDataResult <List <ModelDetailDto> >(result, ModelMessages.FailedModelListed)); }