Ejemplo n.º 1
0
        public async Task <IHttpActionResult> Update([FromBody] FlatOwnerFamilyViewModel viewmodel)
        {
            var model = Mapper.Map <FlatOwnerFamily>(viewmodel);
            await _flatOwnerFamilyService.Update(model);

            return(Ok());
        }
Ejemplo n.º 2
0
        public async Task <IHttpActionResult> Create([FromBody] FlatOwnerFamilyViewModel viewmodel)
        {
            var model  = Mapper.Map <FlatOwnerFamily>(viewmodel);
            var result = await _flatOwnerFamilyService.Create(model);

            return(Ok(Mapper.Map <FlatOwnerFamilyViewModel>(result)));
        }