示例#1
0
 public async Task CreateUser(User user, string password)
 {
     byte[] passwordHash, passwordSalt;
     GeneratePassword(password, out passwordHash, out passwordSalt);
     user.PasswordHash = passwordHash;
     user.PasswordSalt = passwordSalt;
     _context.Add(user);
     await _context.SaveChangesAsync();
 }
示例#2
0
 public async Task CreatetVessel(Vessel vessel)
 {
     _context.Add(vessel);
     await _context.SaveChangesAsync();
 }
示例#3
0
 public async Task CreateDocument(Document document)
 {
     document.IsActive = true;
     _context.Add(document);
     await _context.SaveChangesAsync();
 }
示例#4
0
 public async Task CreateProduct(Product product)
 {
     _context.Add(product);
     await _context.SaveChangesAsync();
 }
示例#5
0
 public async Task CreateLogger(Logger logger)
 {
     _context.Add(logger);
     await _context.SaveChangesAsync();
 }
示例#6
0
 public async Task CreateCompany(Company company)
 {
     _context.Add(company);
     await _context.SaveChangesAsync();
 }
示例#7
0
 public async Task CreateFreigth(Freigth freigth)
 {
     _context.Add(freigth);
     await _context.SaveChangesAsync();
 }
示例#8
0
 public async Task CreateContainer(Container container)
 {
     _context.Add(container);
     await _context.SaveChangesAsync();
 }