static ToDoItemsRepository() { DeclareProjection (m => new ListItemDTO { }, m => m.Id ); DeclareProjection (m => new DetailItemDTO { SubItems = m.SubItems .Select(l => new SubItemDTO { }) }, m => m.Id ); DeclareUpdateProjection <DetailItemDTO> (m => new ToDoItem { SubItems = m.SubItems .Select(l => new ToDoItem { }), AssignedTo = m.AssignedToId == null ? null : new Person { } } ); DeclareProjection (m => new SubItemDTO { }, m => m.Id ); DocumentDBCRUDRepository <Person> .DeclareProjection (m => new PersonListDTO { }, m => m.Surname ); }
static ToDoItemsRepository() { DeclareProjection (m => new ListItemDTO { }, m => m.Id ); DeclareProjection (m => new PatientDTO { FoodPreferences = m.FoodPreferences .Select(l => new FoodPrefDTO { }) }, m => m.Id ); DeclareUpdateProjection <PatientDTO> (m => new Patient { FoodPreferences = m.FoodPreferences .Select(l => new BrAInsave.Models.CosmosDB.FoodPreference { }), AssignedTo = m.AssignedToId == null ? null : new Person { } } ); DeclareProjection (m => new FoodPrefDTO { }, m => m.Id ); DocumentDBCRUDRepository <Person> .DeclareProjection (m => new PersonListDTO { }, m => m.Surname ); }