Beispiel #1
0
        public bool SaveDailyScrum(Model.DailyScrum dailyScrum)
        {
            var manager = Ioc.Instance.GetService(typeof(IDailyScrumManager)) as IDailyScrumManager;

            var dtoDailyScrum = ObjectMapperManager.DefaultInstance.GetMapper<Model.DailyScrum, Dto.DailyScrum>().Map(dailyScrum);

            //if(dailyScrum.DailyProjectScrums!=null)
            //    for (var i = 0; i < dailyScrum.DailyProjectScrums.Count; i++)
            //    {
            //        dtoDailyScrum.DailyProjectScrums[i].Project = new Dto.Project();
            //        dtoDailyScrum.DailyProjectScrums[i].Project.Id = dailyScrum.DailyProjectScrums[i].ProjectId;
            //    }

            return manager.Save(dtoDailyScrum);
        }
Beispiel #2
0
        public User Register(Model.RegisterModel registerModel)
        {
            var manager = Ioc.Instance.GetService(typeof(IUserManager)) as IUserManager;

            var dtoUser = ObjectMapperManager.DefaultInstance.GetMapper<Model.RegisterModel, Dto.User>().Map(registerModel);

            var savedUser = manager.Save(dtoUser);
            var result = ObjectMapperManager.DefaultInstance.GetMapper<Dto.User, Models.User>().Map(savedUser);

            return result;
        }