public virtual async Task <T> AddAsync(T t) { Context.Set <T>().Add(t); await Context.SaveChangesAsync(); return(t); }
public async Task <SightEntity> AddSightAsync(SightEntity sight) { await _OSContext.Sight.AddAsync(sight); await _OSContext.SaveChangesAsync(); _Logger.LogInformation("(Repository) Sight Added For: {1}", sight.OversiteId); return(sight); }
public async Task <RefreshTokenEntity> AddAsync(RefreshTokenEntity token) { await _OSContext.RefreshToken.AddAsync(token); await _OSContext.SaveChangesAsync(); _Logger.LogInformation("(Repository) Token Added: {1}", token.UserId); return(token); }
public async Task <UserEntity> AddAsync(UserEntity user) { await _OSContext.User.AddAsync(user); await _OSContext.SaveChangesAsync(); _Logger.LogInformation("(Repository) User Added: {1}", user.Username); return(user); }