Exemple #1
0
 public T Add <T>(T entity) where T : IEntity
 {
     IdGenerator.SetId(entity);
     DataStore.ListFor <T>().Add(entity);
     return(entity);
 }
Exemple #2
0
 public T Add <T>(T entity) where T : IEntity
 {
     IdGenerator.SetId(entity);
     Write(GetPath <T>(entity.Id), entity);
     return(entity);
 }