Пример #1
0
 /// <summary>
 /// A method that convert Modals.Location to Entities.Location
 /// </summary>
 /// <param name="location"> Modals.Location that will be converted to Entities.Location </param>
 /// <returns> return an Entities.Location object s</returns>
 public static Project1.DataAccess.Entities.Location Map(Project1.Library.Modals.Location location)
 {
     return(new DataAccess.Entities.Location
     {
         StoreId = location.ID,
         LocationId = location.LocationID,
         X = location.Address.X,
         Y = location.Address.Y,
     });
 }
Пример #2
0
 /// <summary>
 /// A method that converts the DataAcess.Entities.Location => Library.Modals.Location
 /// </summary>
 /// <param name="location"> DataAcess.Entities.Location to be converted to Library.Modals.Location </param>
 /// <returns> return a Library.Modals.Location</returns>
 public static Project1.Library.Modals.Location Map(Entities.Location location)
 {
     Library.Modals.Location obj = new Project1.Library.Modals.Location
     {
         ID          = location.StoreId,
         Name        = location.Store.Name,
         Description = location.Store.Description,
         Rules       = location.Store.Rules,
         LocationID  = location.LocationId,
         Address     = new Library.Modals.Address
         {
             X = location.X,
             Y = location.Y
         },
     };
     return(obj);
 }