public EntityDevicePhoneUser Get(int DevicePhoneID, int UserID)
        {
            var data = base.DataContext.DevicePhoneUser.Where(p => p.FK_DevicePhoneID == DevicePhoneID && p.FK_UserID == UserID);

            if (data.Count() == 1)
            {
                return(FactoryDevicePhoneUser.Get(data.Single()));
            }
            else
            {
                return(null);
            }
        }
 public List <EntityDevicePhoneUser> GetAll()
 {
     return(FactoryDevicePhoneUser.GetList(base.DataContext.DevicePhoneUser.ToList()));
 }
 public List <EntityDevicePhoneUser> GetByDevicePhone(int DevicePhoneID)
 {
     return(FactoryDevicePhoneUser.GetList(base.DataContext.DevicePhoneUser.Where(p => p.FK_DevicePhoneID == DevicePhoneID).ToList()));
 }
 public List <EntityDevicePhoneUser> GetByUserIDs(List <int> UserIDs)
 {
     return(FactoryDevicePhoneUser.GetList(base.DataContext.DevicePhoneUser.Where(p => UserIDs.Contains(p.FK_UserID) && p.Status == true).ToList()));
 }
 public List <EntityDevicePhoneUser> GetActives()
 {
     return(FactoryDevicePhoneUser.GetList(base.DataContext.DevicePhoneUser.Where(p => p.Status == true).ToList()));
 }