Beispiel #1
0
        public void Save(NoteDTO entity)
        {
            if (!entity.Id.HasValue)
            {
                entity.Id = Guid.NewGuid();
            }

            NoteRepository.UpsertEntity(entity);
            NoteRepository.Commit();
        }
Beispiel #2
0
 public EditNote(Notes manager, NoteDTO entity)
 {
     InitializeComponent();
     this.Manager = manager;
     this.Entity  = entity;
     if (!Entity.Id.HasValue)
     {
         this.StartPosition = FormStartPosition.CenterScreen;
     }
 }
Beispiel #3
0
 public void Delete(NoteDTO entity)
 {
     NoteRepository.DeleteEntity(entity);
     NoteRepository.Commit();
 }