public static bool IsPersistent(PersistentEntity entity) { return entity.Id != 0; }
/// <summary> /// The primary key for all entities... /// </summary> //[DataMember] //[Key] //public int Id { get; set; } /// <summary> /// The time when the entity was first created. /// </summary> //[DataMember] //public string Created { get; set; } /// <summary> /// The time when the entity was last saved/updated. /// </summary> //[DataMember] //public string Updated { get; set; } protected BaseViewModel(PersistentEntity entity) { this.Id = entity.Id; this.Created = entity.Created; this.Updated = entity.Updated; }