Example #1
0
        public FeatViewModel PutFeat(int id, FeatViewModel feat)
        {
            var featToUpdate = _featRepository.GetById(id);

            FeatMapper.MapModelToEntity(feat, featToUpdate);
            featToUpdate.ModifiedBy = "TEST";
            var updatedFeat = _featRepository.Update(featToUpdate);

            return(FeatMapper.MapEntityToModel(updatedFeat));
        }
Example #2
0
        public FeatViewModel AddFeat(FeatViewModel feat)
        {
            var featToAdd = FeatMapper.MapModelToEntity(feat);

            featToAdd.CreatedBy = "TEST";
            featToAdd.SeedData  = false;
            var addedFeat = _featRepository.Add(featToAdd);

            return(FeatMapper.MapEntityToModel(addedFeat));
        }