public async Task <Employee> Create(Employee employee)
        {
            employee.EmpId = Guid.NewGuid();
            _context.Employees.Add(employee);
            await _context.SaveChangesAsync();

            return(employee);
        }
示例#2
0
        public async Task <Models.Attribute> Create(Models.Attribute attribute)
        {
            attribute.AttrId = Guid.NewGuid();
            _context.Attributes.Add(attribute);
            await _context.SaveChangesAsync();

            return(attribute);
        }