public EditDocumentTitleModel(FileManagerContext context, ILogger <EditDocumentTitleModel> logger, IGetAccountDataService getAccountDataService) { db = context; _logger = logger; _getAccountDataService = getAccountDataService; }
public CreateDepartmentModel(FileManagerContext context, IGetAccountDataService getAccountDataService, ILogger <CreateDepartmentModel> logger) { db = context; _getAccountDataService = getAccountDataService; _logger = logger; }
public IndexModel(FileManagerContext context, ILogger <IndexModel> logger, IGetAccountDataService getAccountDataService) { db = context; _logger = logger; _getAccountDataService = getAccountDataService; }
public DepartmentsListModel(FileManagerContext context, ILogger <DepartmentsListModel> logger, IGetAccountDataService getAccountDataService) { db = context; _logger = logger; _getAccountDataService = getAccountDataService; }
public IEnumerable <Folder> GetAllFolders() { using (var context = new FileManagerContext()) { var allFolders = (from f in context.Folders select f).ToArray(); return(allFolders); } }
public void DeleteFolder(Folder folder) { using (var context = new FileManagerContext()) { context.Folders.Attach(folder); context.Entry(folder).State = EntityState.Deleted; context.SaveChanges(); } }
public IEnumerable <FileNameChange> GetNamesHistory(int fileid) { using (var context = new FileManagerContext()) { var history = (from h in context.FileNameChanges where h.FileId == fileid select h).ToArray(); return(history); } }
public File GetFileWhithContent(int fileId) { using (var context = new FileManagerContext()) { var file = (from c in context.Files where c.FileId == fileId select c).FirstOrDefault(); return(file); } }
public DepartmentModel(FileManagerContext context, ILogger <DepartmentModel> logger, ISmartBreadcrumbService breadcrumbService, IGetAccountDataService getAccountDataService) { db = context; _logger = logger; _breadcrumbService = breadcrumbService; _getAccountDataService = getAccountDataService; }
public Folder GetFolderById(int folderId) { using (var context = new FileManagerContext()) { var folder = (from f in context.Folders where f.FolderId == folderId select f).FirstOrDefault(); return(folder); } }
public GetAccountDataService(UserManager <User> userManager, SignInManager <User> signInManager, FileManagerContext context, ILogger <GetAccountDataService> logger) { _userManager = userManager; _signInManager = signInManager; db = context; _logger = logger; }
public EditUserDepartmentRolesModel(UserManager <User> userManager, FileManagerContext context, IGetAccountDataService getAccountDataService, ILogger <EditUserDepartmentRolesModel> logger) { _userManager = userManager; db = context; _getAccountDataService = getAccountDataService; _logger = logger; }
public DbInitializeService(UserManager <User> userManager, RoleManager <SystemRole> roleManager, IOptions <DbInitializeMainUser> mainUserData, FileManagerContext context) { _roleManager = roleManager; _userManager = userManager; _mainUserData = mainUserData.Value; db = context; }
public ReportingYearModel(FileManagerContext context, ILogger <ReportingYearModel> logger, ISmartBreadcrumbService breadcrumbService, IGetAccountDataService getAccountDataService) { db = context; _logger = logger; _breadcrumbService = breadcrumbService; _getAccountDataService = getAccountDataService; }
public IEnumerable <FileComment> GetFileComments(int fileId) { using (var context = new FileManagerContext()) { var comments = (from c in context.FileComments where c.FileId == fileId select c).ToArray(); return(comments); } }
public void AddFile(File file) { using (var context = new FileManagerContext()) { file.CreationDate = DateTime.Now; context.Files.Attach(file); context.Entry(file).State = EntityState.Added; context.SaveChanges(); } }
public File GetFileById(int fileId) { using (var context = new FileManagerContext()) { var file = (from f in context.Files where f.FileId == fileId select f).FirstOrDefault(); return(file); } }
public IEnumerable <File> GetAllFilesFromFolder(int folderId) { using (var context = new FileManagerContext()) { var files = (from f in context.Files where f.Folder.FolderId == folderId select f).ToArray(); return(files); } }
public UserInfoModel(UserManager <User> userManager, FileManagerContext context, ILogger <UserInfoModel> logger, IGetAccountDataService getAccountDataService) { _userManager = userManager; db = context; _logger = logger; _getAccountDataService = getAccountDataService; }
public void DeleteFile(int fileId) { using (var context = new FileManagerContext()) { var file = (from f in context.Files where f.FileId == fileId select f).FirstOrDefault(); context.Files.Attach(file); context.Entry(file).State = EntityState.Deleted; context.SaveChanges(); } }
public FileManagerService( FileManagerContext context, ILogger <FileManagerService> logger, IHostingEnvironment appEnvironment, IDocumentManagerService documentManagerService) { db = context; _logger = logger; _appEnvironment = appEnvironment; _documentManagerService = documentManagerService; InitializeFilesDirectory(); }
public DocumentModel(FileManagerContext context, ILogger <DocumentModel> logger, ISmartBreadcrumbService breadcrumbService, IGetAccountDataService getAccountDataService, IFileManagerService fileManagerService, IDocumentManagerService documentManagerService) { db = context; _logger = logger; _breadcrumbService = breadcrumbService; _getAccountDataService = getAccountDataService; _fileManagerService = fileManagerService; _documentManagerService = documentManagerService; }
public void UpdateFileComments(int fileId, string comment) { File file; using (var context = new FileManagerContext()) { file = (from f in context.Files where f.FileId == fileId select f).FirstOrDefault(); var newComment = new FileComment(); newComment.CommentText = comment; newComment.FileId = file.FileId; context.FileComments.Add(newComment); context.SaveChanges(); context.Files.Attach(file); context.Entry(file).State = EntityState.Modified; context.SaveChanges(); } }
public void RenameFile(File file) { File oldFile; using (var context = new FileManagerContext()) { oldFile = (from f in context.Files where f.FileId == file.FileId select f).FirstOrDefault(); } var nameChange = new FileNameChange(); if (oldFile.FileName != file.FileName) { nameChange.FileChangeDate = DateTime.Now; nameChange.FileId = file.FileId; nameChange.OldName = oldFile.FileName; nameChange.NewName = file.FileName; if (file.FileNameChanges == null) { file.FileNameChanges = new List <FileNameChange>(); } file.FileNameChanges.Add(nameChange); } file.FileContent = oldFile.FileContent; using (var context = new FileManagerContext()) { context.FileNameChanges.Add(nameChange); context.SaveChanges(); context.Files.Attach(file); context.Entry(file).State = EntityState.Modified; context.SaveChanges(); } }
public ValidationService(ILogger <ValidationService> logger, FileManagerContext context) { _context = context; _logger = logger; }
public DocumentManagerService(FileManagerContext context, ILogger <DocumentManagerService> logger) { db = context; _logger = logger; }
public FileService(FileManagerContext context, ILogger <FileService> logger) { _context = context; _logger = logger; }
public SmartBreadcrumbService(FileManagerContext context) { db = context; }
public UsersRepository(FileManagerContext context) { _context = context; }
public IndexModel(FileManagerContext context) { db = context; }