Inheritance: INotifyPropertyChanging, INotifyPropertyChanged
Exemplo n.º 1
0
 partial void DeleteSpeaker(Speaker instance);
Exemplo n.º 2
0
 partial void UpdateSpeaker(Speaker instance);
Exemplo n.º 3
0
 partial void InsertSpeaker(Speaker instance);
Exemplo n.º 4
0
		private void detach_Speakers(Speaker entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
Exemplo n.º 5
0
		private void attach_Speakers(Speaker entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}
Exemplo n.º 6
0
        public static void Propose(string Email, string SessionTitle, string SessionAbstract)
        {
            var ctx = new ICCData();

            int eId = Event.GetNextEvent().Id;

            var session = new Session()
            { Title = SessionTitle, Abstract = SessionAbstract, EventId = eId };

            ctx.Sessions.InsertOnSubmit(session);
            ctx.SubmitChanges();

            var user = ctx.Users.Where(u => string.Compare(u.Email, Email, true) == 0).FirstOrDefault();

            Speaker speak = new Speaker()
            { SessionId = session.Id, UserId = user.Id };

            ctx.Speakers.InsertOnSubmit(speak);
            ctx.SubmitChanges();
        }