/// <summary> /// Returns a single apptLabel where the id in the request matches the record ID in the database. /// </summary> /// <param name="request">The request used for requesting the record from the database,it only looks at the ID value and none of the other parameters..</param> /// <returns>The apptLabel record as a fully loaded object</returns> public virtual ApptLabelResponse Any(GetApptLabel request) { //return ExecuteFaultHandledMethod(() => //{ ApptLabelResponse response = new ApptLabelResponse(); //IApptLabelRepository _repository = _DataRepositoryFactory.GetDataRepository<IApptLabelRepository>(); var _repository = _DataRepositoryFactory.GetDataRepository <IGenericEntityRepositoryBase <ApptLabel, IDataContextNhJars> >(); response.Label = _repository.GetById(request.Id).ConvertTo <ApptLabelDto>(); return(response); //}); }
/// <summary> /// Update or create a single apptLabel. /// </summary> /// <param name="request">The request containing the apptLabel that needs to be created or updated</param> /// <returns>the updated apptLabel will be returned.</returns> public virtual ApptLabelResponse Any(StoreApptLabel request) { //return ExecuteFaultHandledMethod(() => //{ ApptLabelResponse response = new ApptLabelResponse(); //IApptLabelRepository _repository = _DataRepositoryFactory.GetDataRepository<IApptLabelRepository>(); var _repository = _DataRepositoryFactory.GetDataRepository <IGenericEntityRepositoryBase <ApptLabel, IDataContextNhJars> >(); response.Label = StoreLabel(request.Label, CurrentSessionUsername, _repository); return(response); //}); }