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)); }
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)); }
public FeatViewModel GetFeatById(int id) { return(FeatMapper.MapEntityToModel(_featRepository.GetById(id))); }