public bool UpdateProfile(BasicProfileDto profile) { var entry = _model.ProfileEntities.Find(profile.Id); _model.SaveChanges(); return true; }
public bool AddProfile(BasicProfileDto profile) { var data = new ProfileEntity(); data.Name = profile.firstName; _model.ProfileEntities.Add(data); _model.SaveChanges(); return true; //using (var scope = AutoFacConfiguration.Container.BeginLifetimeScope()) //{ // var dataContext = scope.Resolve<IDataContext>(); // var tourServiceLogic = scope.Resolve<ITourService>(new NamedParameter("dataContext", dataContext)); // tourServiceLogic.AddTour(tour); //} }