Esempio n. 1
0
        public ActionResult <Address> Post([FromBody] Address adr)
        {
            //return Ok(AddressDAO.Create(adr));
            Address found = AddressDAO.Create(adr);

            return(found != null ?  (ActionResult <Address>)Ok(found) : NotFound("This address is already exist"));
        }
Esempio n. 2
0
        public Place CreatePlaceAndAddress(PlaceAndAddress place)
        {
            Address adr = AddressDAO.Create(place.Address);

            place.Place.IdAdr = adr.Id;
            return(PlaceDAO.Create(place.Place));
        }
Esempio n. 3
0
        public User CreateUserAndAddress(UserAndAddress user)
        {
            Address adr = AddressDAO.Create(user.Address);

            user.User.Idadr = adr.Id;
            return(UserDAO.Create(user.User));
        }