Beispiel #1
0
        public Guid Post([FromBody] Department model)
        {
            var item = Mapper.Map <Data.Models.Department>(model);

            item.Id = Guid.NewGuid();
            _context.Departments.Add(item);
            _context.SaveChanges();
            return(item.Id);
        }
        public Guid Post([FromBody] Faculty model)
        {
            var item = Mapper.Map <Data.Models.Faculty>(model);

            item.Id = Guid.NewGuid();
            _context.Faculties.Add(item);
            _context.SaveChanges();
            return(item.Id);
        }