Exemplo n.º 1
0
 public bool EditSsource(Source editedSource)
 {
     var src = GetSource(editedSource.Id);
     if (src == null)
         return false;
     src.Type = editedSource.Type;
     src.Author = editedSource.Author;
     src.FullTitle = editedSource.FullTitle;
     src.PublicationYear = editedSource.PublicationYear;
     SaveChanges();
     return true;
 }
Exemplo n.º 2
0
 public Source AddSource(Source source)
 {
     var src = entities.Sources.Add(source);
     SaveChanges();
     return src;
 }