Ejemplo n.º 1
0
    public List<MePhoneInfo> GetSupportedPhones(int idMe) {
      using (var db = new DbDataContext()) {
        ISingleResult<GetSupportedPhonesResult> result = db.GetSupportedPhones(idMe);
        var res = new List<MePhoneInfo>();

        foreach (GetSupportedPhonesResult item in result) {
          var i = new MePhoneInfo {
                                    filename = item.filename,
                                    idModel = item.idModel,
                                    idVendor = item.idVendor,
                                    ModelName = item.ModelName,
                                    VendorName = item.VendorName
                                  };
          res.Add(i);
        }
        return res;
      }
    }
Ejemplo n.º 2
0
        public List <MePhoneInfo> GetSupportedPhones(int idMe)
        {
            using (var db = new DbDataContext()) {
                ISingleResult <GetSupportedPhonesResult> result = db.GetSupportedPhones(idMe);
                var res = new List <MePhoneInfo>();

                foreach (GetSupportedPhonesResult item in result)
                {
                    var i = new MePhoneInfo {
                        filename   = item.filename,
                        idModel    = item.idModel,
                        idVendor   = item.idVendor,
                        ModelName  = item.ModelName,
                        VendorName = item.VendorName
                    };
                    res.Add(i);
                }
                return(res);
            }
        }