//GetByYear
        public static List <LastLocation1> GetLastLocationByYear(int y)
        {
            List <LastLocation> lst = new List <LastLocation>(LastLocationDL.GetAllLastLocations());

            return(LastLocationConvertor.ConvertToListDto(lst.Where(d => d.Date.Year == y).ToList()));
        }
 //GetAll
 public static List <LastLocation1> GetAllLastLocations()
 {
     return(LastLocationConvertor.ConvertToListDto(LastLocationDL.GetAllLastLocations()));
 }
        //GetByFullDate
        public static List <LastLocation1> GetLastLocationByFullDate(DateTime date)
        {
            List <LastLocation> lst = new List <LastLocation>(LastLocationDL.GetAllLastLocations());

            return(LastLocationConvertor.ConvertToListDto(lst.Where(d => d.Date.Equals(date)).ToList()));
        }
        //GetByUserId
        public static List <LastLocation1> GetByUserId(int userId)
        {
            List <LastLocation> lst = new List <LastLocation>(LastLocationDL.GetAllLastLocations());

            return(LastLocationConvertor.ConvertToListDto(lst.Where(u => u.UserId == userId).ToList()));
        }
 //GetById
 public static LastLocation1 GetLastLocationById(int id)
 {
     return(LastLocationConvertor.ConvertToDto(LastLocationDL.GetById(id)));
 }
        //Delete האם יש למחוק קודם מהטבלאות שהוא נמצא בהן בקשרי גומלין
        public static void DeleteLastLocation(LastLocation1 lastLocation)
        {
            LastLocation newlastLocation = LastLocationConvertor.ConvertToDL(lastLocation);

            LastLocationDL.DeleteLastLocation(newlastLocation);
        }
 //Update
 public static void UpdateLastLocation(LastLocation1 l)
 {
     LastLocationDL.UpdateLastLocation(LastLocationConvertor.ConvertToDL(l));
 }