public void AddFile(StoredFileDTO sharedFileDTO) { _storeFileDbContext.Files.Add(new StoredFile { UserId = sharedFileDTO.UserId, FileName = sharedFileDTO.FileName, FileSize = sharedFileDTO.FileSize, UploadDate = sharedFileDTO.UploadDate }); _storeFileDbContext.SaveChanges(); }
public void AddToken(TokenDTO tokenDTO) { _storeFileDbContext.AccessTokens.Add(new Token { AccessToken = tokenDTO.AccessToken, ExpirationDate = tokenDTO.ExpirationDate, TokenId = tokenDTO.TokenId, UserId = tokenDTO.UserId }); _storeFileDbContext.SaveChanges(); }
public void AddUser(StoredFileUserDTO registerDTO) { _storeFileDbContext.Users.Add(new StoredFileUser { FirstName = registerDTO.FirstName, LastName = registerDTO.LastName, BirthDay = registerDTO.BirthDay, Email = registerDTO.Email, PhoneNumber = registerDTO.PhoneNumber, Password = registerDTO.Password }); _storeFileDbContext.SaveChanges(); }