public static async Task LeaveGameSession(this GetOnBoardDbContext source, GameSessionApplicationUser gSAppUser, GameSession gameSession) { source.GameSessionApplicationUsers.Remove(gSAppUser); await source.SaveChangesAsync(); await source.UpdateFreeSlotsInGS(gameSession, -1); }
public static async Task <int> AddGameSession(this GetOnBoardDbContext source, GameSession gameSession) { source.GameSessions.Add(gameSession); await source.SaveChangesAsync(); return(gameSession.ID); }
public AuthenticationController(GetOnBoardDbContext dbContext, UserManager <ApplicationUser> userManager, IConfiguration configuration, ILogger <AuthenticationController> logger) { _dbContext = dbContext; _userManager = userManager; _configuration = configuration; _logger = logger; }
public static async Task UpdateDataInUserProfile(this GetOnBoardDbContext source, UserProfile userProfile, UpdateProfileViewModel model, string boardGameImage) { userProfile.FirstName = model.FirstName; userProfile.LastName = model.LastName; userProfile.City = model.City; userProfile.Description = model.Description; userProfile.Avatar = boardGameImage; source.UserProfiles.Update(userProfile); await source.SaveChangesAsync(); }
public static async Task UpdateNumberGamesSessionDeletedasAdmin(this GetOnBoardDbContext source, UserProfile userProfile) { userProfile.NumberOfGamesSessionDeletedasAdmin = userProfile.NumberOfGamesSessionDeletedasAdmin + 1; await source.SaveChangesAsync(); }
public static async Task UpdateFreeSlotsInGS(this GetOnBoardDbContext source, GameSession gameSession, int count) { gameSession.SlotsFree = gameSession.SlotsFree + count; source.GameSessions.Update(gameSession); await source.SaveChangesAsync(); }
public static async Task RemoveGameSessionAsync(this GetOnBoardDbContext source, GameSession gameSession) { gameSession.IsCanceled = true; source.GameSessions.Update(gameSession); await source.SaveChangesAsync(); }
public ProfileRepository(ILogger <ProfileRepository> logger, GetOnBoardDbContext db, IBlobStorageRepository blobStorage) { _logger = logger; _db = db; _blobStorage = blobStorage; }
public ChatRepository(ILogger <ChatRepository> logger, GetOnBoardDbContext db) { _logger = logger; _db = db; }
public static async Task AddMessageFromUser(this GetOnBoardDbContext source, Contact contact) { source.Contact.Add(contact); await source.SaveChangesAsync(); }
public ContactController(GetOnBoardDbContext db, ILogger <GameSessionsController> logger) { _db = db; _logger = logger; }
public ProfileController(GetOnBoardDbContext db, ILogger <ProfileController> logger, IProfileRepository repository) { _db = db; _logger = logger; _profileRepository = repository; }
public ChatHub(IChatRepository chat, GetOnBoardDbContext db) { _chat = chat; _db = db; }
public ImageController(GetOnBoardDbContext dbContext, ILogger <ImageController> logger, IBlobStorageRepository blobStorage) { _dbContext = dbContext; _logger = logger; _blobStorage = blobStorage; }
public GameSessionsRepository(ILogger <GameSessionsRepository> logger, GetOnBoardDbContext db, IBlobStorageRepository blobStorage) { _logger = logger; _db = db; _blobStorage = blobStorage; }
public static async Task UpdateNumberGamesJoined(this GetOnBoardDbContext source, UserProfile userProfile) { userProfile.NumberOfGamesSessionJoined = userProfile.NumberOfGamesSessionJoined + 1; await source.SaveChangesAsync(); }
public static async Task UpdateNumberOfGamesSessionYouWereKickedOut(this GetOnBoardDbContext source, UserProfile userProfile) { userProfile.NumberOfGamesSessionYouWereKickedOut = userProfile.NumberOfGamesSessionYouWereKickedOut + 1; await source.SaveChangesAsync(); }
public static async Task AddBoardGameToGameSession(this GetOnBoardDbContext source, GameSessionBoardGame gameSessionBG) { source.GameSessionBoardGames.Add(gameSessionBG); await source.SaveChangesAsync(); }
public GameSessionsController(GetOnBoardDbContext db, ILogger <GameSessionsController> logger, IGameSessionsRepository repository) { _db = db; _logger = logger; _gameSessionRepository = repository; }
public static async Task AddBoardGame(this GetOnBoardDbContext source, BoardGame boardGame) { source.BoardGames.Add(boardGame); await source.SaveChangesAsync(); }
public static async Task RemoveGameSessionBoardGamesAsync(this GetOnBoardDbContext source, GameSessionBoardGame gameSessionBG) { source.GameSessionBoardGames.Remove(gameSessionBG); await source.SaveChangesAsync(); }
public static async Task RemoveGameSessionApplicationUserAsync(this GetOnBoardDbContext source, GameSessionApplicationUser gameSessionAppUser) { source.GameSessionApplicationUsers.Remove(gameSessionAppUser); await source.SaveChangesAsync(); }