Exemplo n.º 1
0
 public Domain.Vehicle UpdateVehicle(Domain.Vehicle vehicle)
 {
     vehicle.Engine = Engine;
     vehicle.Kw     = Kw;
     vehicle.Year   = Year;
     vehicle.Model  = Model;
     vehicle.Make   = System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(Make.Replace("-", " "));
     return(vehicle);
 }
Exemplo n.º 2
0
 public static DetailsModel CreateFromVehicle(Domain.Vehicle vehicle)
 {
     return(new DetailsModel()
     {
         Id = vehicle.VehicleId,
         Kw = vehicle.Kw,
         Engine = vehicle.Engine,
         Year = vehicle.Year,
         Model = vehicle.Model,
         Make = vehicle.Make,
         Author = vehicle.User.FirstLastName
     });
 }
Exemplo n.º 3
0
 public static IndexVehicleModel CreateFromVehicle(Domain.Vehicle vehicle)
 {
     return(new IndexVehicleModel()
     {
         Id = vehicle.VehicleId,
         Kw = vehicle.Kw,
         Engine = vehicle.Engine,
         Year = vehicle.Year,
         Model = vehicle.Model,
         Make = vehicle.Make,
         CreateDateTime = vehicle.CreatedAt
     });
 }
Exemplo n.º 4
0
        public Domain.Vehicle GetVehicle(UserInt creator)
        {
            Domain.Vehicle vehicle = new Domain.Vehicle
            {
                UserId = creator.Id,
                Engine = Engine,
                Kw     = Kw,
                Year   = Year,
                Model  = Model,
                Make   = System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(Make.Replace("-", " "))
            };

            return(vehicle);
        }
 public void Delete(Domain.Vehicle element)
 {
     throw new NotImplementedException();
 }