public async Task <ProductTemplatesGetRes> GetProductTemplates(ProductTemplatesGetReq request, string ticket) { ProductTemplatesGetRes ProductTemplatesGetRes = new ProductTemplatesGetRes(); ProductTemplatesGetRes = await serviceProxy.PostData(_configuration.GetValue <string>("ServiceMaster:GetProductTemplates"), request, typeof(ProductTemplatesGetRes), ticket); return(ProductTemplatesGetRes); }
public List <mProductTemplates> GetProductTemplates(ProductTemplatesGetReq request) { if (string.IsNullOrEmpty(request?.VoyagerProductTemplate_Id)) { return(_MongoContext.mProductTemplates.AsQueryable().ToList()); } else { return(_MongoContext.mProductTemplates.AsQueryable().Where(a => a.VoyagerProductTemplate_Id == request.VoyagerProductTemplate_Id).ToList()); } }
public ProductTemplatesGetRes GetProductTemplates(ProductTemplatesGetReq request) { var response = new ProductTemplatesGetRes(); try { response.ProductTemplates = _MasterRepository.GetProductTemplates(request); response.ResponseStatus.Status = "Success"; } catch (Exception ex) { response.ResponseStatus.Status = "Failure"; response.ResponseStatus.ErrorMessage = "An Error Occurs :- " + ex.Message; } return(response); }