Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Member_14830098

@Member_14830098
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • WCF Service doesn't return data
    M Member_14830098

    Hello, i want to create simple mobile add using Xamarin who use WCF Service, but i have problem with return data from database. Firstly i connect database with WCF and create code: IServiceWhitewagon:

    [ServiceContract]
    public interface IServiceWhitewagon
    {

        \[OperationContract\]
        List GetCompany();
    }
    

    ServiceWhitewagon

    public class ServiceWhitewagon : IServiceWhitewagon
    {
    public ServiceWhitewagon()
    {

        }
    

    public List GetCompany()
    {
    WhitewagonEntities db = new WhitewagonEntities();
    return
    (from company in db.Company
    select new CompanyForView
    {
    idCompany = company.idCompany,
    name = company.name,
    phone = company.phone,
    adress = company.adress
    }
    ).ToList();
    }
    }

    CompanyForView

    [DataContract]
    public class CompanyForView
    {
    [DataMember]
    public int idCompany { get; set; }

        \[DataMember\]
        public string name { get; set; }
    
        \[DataMember\]
        public string adress { get; set; }
    
        \[DataMember\]
        public string phone { get; set; }
    }
    

    In next step i connect WCF with my app called AppMobileWhitewagon Screen While connect WCF I usinghttp://localhost:54308/ and i saw all created metod in WCF. Whats more i test WCF in WCT Test Client and i see data from datatable: Screen In MobileApp i have problem with show data from datatable. When in App I click on the button who should show card with data from datatable app freeze on 20 seconds and show empty card. My code in class who should get data

    public class CompanyDataStore : ItemDataStore
    {
    public CompanyDataStore()
    {
    items = zamowieniaServices.GetCompany(null).GetCompanyResult.Select(k => new Company
    {
    idCompany = k.idCompany,
    name = k.name,
    phone = k.phone,
    adress = k.adress
    }).ToList();
    }
    }

    ItemDataStore

    public abstract class ItemDataStore : IDataStore
    {
    public List items;

    C# csharp database mobile wcf help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups