Hello,
I have desktop app with c#
and i added app id and key id
and used this code to add data to database but the data always is empty or null
var film = new Film();
film.setName(“soooft”);
film.setGenre(“aaa”);
film.setPlot(“fdgveqw”);
film.setUrl(“gdfwrw”);
var f = Backendless.Data.Of<Film>().Save(film);
Hello,
What does the Film class look like?
Mark
1 Like
class Film
{
private String plot;
private String genre;
private String name;
private String objectId;
private String url;
private DateTime created;
private DateTime updated;
private String ownerId;
public String getPlot()
{
return plot;
}
public void setPlot(String plot)
{
this.plot = plot;
}
public String getGenre()
{
return genre;
}
public void setGenre(String genre)
{
this.genre = genre;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getObjectId()
{
return objectId;
}
public String getUrl()
{
return url;
}
public void setUrl(String url)
{
this.url = url;
}
public DateTime getCreated()
{
return created;
}
public DateTime getUpdated()
{
return updated;
}
public String getOwnerId()
{
return ownerId;
}
}
You need to use public properties with get/set accessors. Private fields with get/set methods (as you have it) will not work.
Thanks very much. It worked now
but please i want know why firstly not worked although it worked in android application
thanks again