Example #1
0
        public static Library.Location MapLocation(Entities.Locations dbmodel)
        {
            Library.Location result = new Library.Location
            {
                Id        = dbmodel.LocationId,
                Name      = dbmodel.Name,
                Inventory = dbmodel.InventoryItems.Select(MapInventoryItem).ToList()
            };

            return(result);
        }
Example #2
0
        /*------------------------------------------------------*/


        /* Location mapping */

        public static Entities.Locations MapLocation(Library.Location model)
        {
            Entities.Locations result = new Entities.Locations
            {
                LocationId = model.Id,
                Name       = model.Name,
                //InventoryItems = model.Inventory.Select(i => MapInventoryItem(model,i)).ToList()
            };

            return(result);
        }