我使用10Gen认可的c#驱动程序用于mongoDB用于ac#应用程序和数据浏览我正在使用Mongovue.
以下是两个示例文档架构:
{
"_id": {
"$oid": "4ded270ab29e220de8935c7b"
},
"Relationships": [
{
"RelationshipType": "Person",
"Attributes": {
"FirstName": "Travis",
"LastName": "Stafford"
}
},
{
"RelationshipType": "Student",
"Attributes": {
"GradMonth": "",
"GradYear": "",
"Institution": "Test1",
}
},
{
"RelationshipType": "Staff",
"Attributes": {
"Department": "LIS",
"OfficeNumber": "12",
"Institution": "Test2",
}
}
]
},
{
"_id": {
"$oid": "747ecc1dc1a79abf6f37fe8a"
},
"Relationships": [
{
"RelationshipType": "Person",
"Attributes": {
"FirstName": "John",
"LastName": "Doe"
}
},
{
"RelationshipType": "Staff",
"Attributes": {
"Department": "Dining",
"OfficeNumber": "1",
"Institution": "Test2",
} …Run Code Online (Sandbox Code Playgroud) 希望有人可以提供帮助.使用带有.net版本2的DDay.iCal版本1.0.1.490,我在调用SerilizeToString方法后得到重复的事件事件.
示例代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DDay.iCal;
using DDay.iCal.Serialization.iCalendar;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
iCalendar iCal = new iCalendar();
Event evt = iCal.Create<Event>();
Uri eventLink = new Uri("http://middlebury.edu";);
evt.IsAllDay = false;
evt.Start = new iCalDateTime(DateTime.Parse("2011-08-11"));
evt.Duration = new TimeSpan(2, 0, 0);
evt.Location = "Test";
evt.Summary = "Breakfast";
evt.Url = eventLink;
evt.Description = "Sausage Links" + "\n" + "Pancakes" + "\n";
iCal.Events.Add(evt);
iCalendarSerializer serializer = new iCalendarSerializer(iCal);
string result = …Run Code Online (Sandbox Code Playgroud)