public ContextSeed() { _context = new DigichListContext(); _roleRepository = new RoleRepository(_context); _defectImageRepository = new DefectImageRepository(); _userRepository = new UserRepository(_context); _defectRepository = new DefectRepository(_context); }
public async Task <DefectImage> SaveImageAsStringByteArray(string path) { var imageArray = await File.ReadAllBytesAsync(path); string base64ImageRepresentation = Convert.ToBase64String(imageArray); using DigichListContext context = new DigichListContext(); DefectImage defectImage = new DefectImage { Image = base64ImageRepresentation }; return(defectImage); }
public RoleRepository(DigichListContext context) : base(context) { }
public UserRepository(DigichListContext context) : base(context) { }
public Repository(DigichListContext context) { _context = context ?? throw new ArgumentNullException(nameof(context)); }
public DefectRepository(DigichListContext context) : base(context) { }
public AdminRepository(DigichListContext context) : base(context) { }