public PermissionRepository( IServiceProvider serviceProvider, DataRepositoryContext context, IDataEventHandlers eventHandlers = null) : base(serviceProvider, context, eventHandlers) { }
public AuthorizationCodeRepository( IServiceProvider serviceProvider, DataRepositoryContext context, IDataEventHandlers eventHandlers = null) : base(serviceProvider, context, eventHandlers) { }
public ClientApplicationRepository( IServiceProvider serviceProvider, DataRepositoryContext context, IDataEventHandlers eventHandlers = null) : base(serviceProvider, context, eventHandlers) { }
public UserRepository( IServiceProvider serviceProvider, DataRepositoryContext context, IPasswordEncryption passwordEncryption, CurrentClientApplication currentClientApplication, ILogger <UserRepository> logger, IDataEventHandlers eventHandlers = null) : base(serviceProvider, context, eventHandlers) { _passwordEncryption = passwordEncryption ?? throw new ArgumentNullException(nameof(passwordEncryption)); _currentClientApplication = currentClientApplication ?? throw new ArgumentNullException(nameof(currentClientApplication)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public Project GetProjectByCode(string code) { try { using (DataRepositoryContext db = new DataRepositoryContext()) { var project = db.Database.SqlQuery <Project>(@"GetProjectByCode @Code", new SqlParameter("Code", code)).FirstOrDefault(); return(project); } } catch (Exception ex) { throw ex; } }
public License GetByProject(Guid projectId) { try { using (DataRepositoryContext db = new DataRepositoryContext()) { var license = db.Database.SqlQuery <License>(@"GetLicenseByProjectId @ProjectId", new SqlParameter("ProjectId", projectId)).FirstOrDefault(); return(license); } } catch (Exception ex) { throw ex; } }
public LoginDetail Save(LoginDetail entity) { try { using (DataRepositoryContext db = new DataRepositoryContext()) { var loginDetail = db.Database.SqlQuery <LoginDetail>(@"LoginDetailSave @Id, @ProjectId, @UserName, @IPAddress, @PCName, @CreatedDate, @UpdatedDate", new SqlParameter("Id", entity.Id), new SqlParameter("ProjectId", entity.ProjectId), new SqlParameter("UserName", entity.UserName ?? (object)DBNull.Value), new SqlParameter("IPAddress", entity.IPAddress ?? (object)DBNull.Value), new SqlParameter("PCName", entity.PCName ?? (object)DBNull.Value), new SqlParameter("CreatedDate", entity.CreatedDate), new SqlParameter("UpdatedDate", entity.UpdatedDate ?? (object)DBNull.Value)).FirstOrDefault(); return(loginDetail); } } catch (Exception ex) { throw ex; } }
public FileRepository(IServiceProvider serviceProvider, DataRepositoryContext context, ISimplifier simplifier, IDataEventHandlers eventHandlers = null) : base(serviceProvider, context, eventHandlers) { _simplifier = simplifier; }