Exemplo n.º 1
0
        public async Task <int> AddSamurai(Domain.Samurai samurai, string user = null)
        {
            _ = await _context.Samurais.AddAsync(samurai);

            //_context.Entry(samurai).Property("Created").CurrentValue = DateTime.UtcNow;
            //_context.Entry(samurai).Property("LastModified").CurrentValue = DateTime.UtcNow;
            //_context.Entry(samurai).Property("CreatedBy").CurrentValue = user;
            return(await _context.SaveChangesAsync());
        }