As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
Hi,
This documentation link: http://devcenter.kinvey.com/rest/guides/datastore#RelationalData covers a similar scenario of books collection with reference to authors and publishers. This should set you up to use Kinvey references effectively.
To sum it up in one sentence, you need to save editors first and then save the book object with KinveyRef array containing editor ids.
Let me know if you get face any issues with the implementation.
Regards,
Wani
Kinvey Support
hi Zaid Mirza,
did u get something about access kinvey in C# application ?
in firebase can be possible for storing and retrieving bitmap images
Hi Zaid,
Can you tell me more about your use case:
Regards,
Wani
Kinvey Support
ok, i planing move on kinvey for Windows dektop application and mobile application. so it's possible right ?
////Insertion Books st = new Books(); st.BookName = "C#"; st.Title = "Intro to C#"; Editors ed = new Editors(); ed.EditorName = "Junaid"; ed.EditorAge = 28; st.Editors.Add(ed); Editors ed1 = new Editors(); ed.EditorName = "Obaid"; ed.EditorAge = 27; st.Editors.Add(ed1); DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(Books)); MemoryStream mem = new MemoryStream(); ser.WriteObject(mem, st); // string data = Encoding.UTF8.GetString(mem.ToArray(), 0, (int)mem.Length); WebClient webClient = new WebClient(); webClient.Headers["Content-type"] = "application/json"; webClient.Encoding = Encoding.UTF8; byte[] credentialBuffer = new UTF8Encoding().GetBytes("zaidmirza" + ":" + "zaidmirza"); string authToken = Convert.ToBase64String(credentialBuffer); string authHeaderValue = string.Format(System.Globalization.CultureInfo.InvariantCulture, "Basic {0}", authToken); webClient.Headers["Authorization"] = authHeaderValue; byte[] data = webClient.UploadData("http://baas.kinvey.com/appdata/:appkey/Books", "POST", mem.ToArray()); MemoryStream stream = new MemoryStream(data); DataContractJsonSerializer obj = new DataContractJsonSerializer(typeof(Books)); Books result = obj.ReadObject(stream) as Books;
I made two DataContracts for Json Serialization and Deserialization in C# named "Books","Editors".
I made Editors as ICollection in Books Contract as you can see below
namespace KinveyUD { [DataContract] class Books { public Books() { this.Editors = new HashSet<Editors>(); } [DataMember] public string BookName { get; set; } [DataMember] public string Title { get; set; } [DataMember] public string _id { get; set; } [DataMember(EmitDefaultValue = false)] public virtual ICollection<Editors> Editors { get; set; } } }
Now My problem is that. I want to Insert References on Kinvey from C#.
I made Books Collection and Editor Collection on kinvey App.
But confused how to add one Book with many Editiors.
How KinveyRef Objects to miantain ?
As you can see in above POST request sample code. Im adding Editors in Books Object then Posting Books on Kinvey. In this way , Editors are not being saved on Editors Collection on kinvey but Editors are being saved as array value in Books Record
see below image
But I want to maintain Kinvey Standard methods for references by using _type,KinveyRef,_Id etc
Please tell me how to do that
Zaid Mirza
Scenario is,
Im new to Kinvey,
I need some tutorials for Specific C# to use with kinvey so that I can CRUD operations on REST API.
Regards:
Zaid Mirza