Ejemplo n.º 1
0
        public async Task <Guid> CreateUser(CreateUserRequest request, CancellationToken token)
        {
            var user = new UserEntity
            {
                Name    = request.Name,
                Raiting = new Random().Next(0, int.MaxValue)
            };
            await _context.AddAsync(user, token);

            await _context.SaveChangesAsync(token);

            return(user.Id);
        }