/// <summary> /// Returns a single BOSRecord 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.</param> /// <returns>If FetchLazy was set to false, the JarsBOSRecord item will be populated, if not then the JarsBOSRecordBase record will be filled with data.</returns> public virtual BOSEntityResponse Any(GetBOSEntity request) { BOSEntityResponse response = new BOSEntityResponse(); IGenericEntityRepositoryBase <BOSEntity, IDataContextBOS> _repository = _DataRepositoryFactory.GetDataRepository <IGenericEntityRepositoryBase <BOSEntity, IDataContextBOS> >(); response.BOSEntity = _repository.GetById(request.Id, true).ConvertTo <BOSEntityDto>(); return(response); }
public virtual BOSEntityResponse Any(StoreBOSEntity request) { BOSEntityResponse response = new BOSEntityResponse(); IGenericEntityRepositoryBase <BOSEntity, IDataContextBOS> _repository = _DataRepositoryFactory.GetDataRepository <IGenericEntityRepositoryBase <BOSEntity, IDataContextBOS> >(); if (request.BOSEntity != null) { response.BOSEntity = _repository.CreateUpdate(request.BOSEntity.ConvertTo <BOSEntity>(), CurrentSessionUsername).ConvertTo <BOSEntityDto>(); } return(response); }