Esempio n. 1
0
        public IActionResult Add([FromBody] UserListModel userList)
        {
            if (userList == null)
            {
                return(BadRequest());
            }
            var entry = Data.UserList.Create(userList.UserId, userList.Location, userList.Id, userList.FacebookId, userList.Name,
                                             userList.Description, userList.StartTime, userList.EndTime, userList.ImageURL);

            _repository.Add(entry);

            return(CreatedAtRoute("GetById", new { id = entry.Id }, entry));
        }
Esempio n. 2
0
        public IActionResult Add([FromBody] UserListModel userList)
        {
            if (userList == null)
            {
                return(BadRequest());
            }
            var entry = Data.Domain.UserList.Create(userList.UserEmail, userList.Location, userList.Name,
                                                    userList.Description, userList.ImageUrl, userList.EventType, userList.StartTime, userList.EndTime);

            _repository.Add(entry);

            return(CreatedAtRoute("GetById", new { Id = entry.Id }, entry));
        }