コード例 #1
0
        public async Task <Person> CreateAsync(Person model)
        {
            await _db.AddAsync(model);

            await _db.SaveChangesAsync();

            return(model);
        }
コード例 #2
0
        public async Task <Account> CreateAsync(Account model)
        {
            model.CreatedAt = DateTime.UtcNow;
            model.IsDeleted = false;

            await _db.AddAsync(model);

            await _db.SaveChangesAsync();

            return(model);
        }