示例#1
0
        public StarWarsFanModel GetMostRecentFan()
        {
            var dalModel = _fanStore.GetMostRecentFan();
            var fanModel = new StarWarsFanModel();

            fanModel.Id   = dalModel.Id;
            fanModel.Name = dalModel.Name;

            return(fanModel);
        }
示例#2
0
        public StarWarsFanModel AddFan(AddStarWarsFanModel userModel)
        {
            var dalModel = new FanDALModel();

            dalModel.Name = userModel.Name;
            _fanStore.InsertNewFan(dalModel);

            var fanModel = new StarWarsFanModel();

            fanModel.Name = userModel.Name;
            return(fanModel);
        }