wstaw złożone obiekty do tabeli azure za pomocą TableServiceEntity
Rozważałem dodanie całego obiektu złożonego do tabeli. Pochodząc z dobrego starego podejścia SQL, oczywiście oddzieliłem to od tabel, ale próbuję innego podejścia. Więc zasadniczo mam obiekt, który składa się z klasy zagnieżdżonej (coś, co dostajesz, gdy deserializujesz kolekcję json), która ma zwykłego Klienta, Biznes i listę InvoiceItems.
public class Business
{
public string _id { get; set; }
public string name { get; set; }
public string street_1 { get; set; }
public string street_2 { get; set; }
public string town { get; set; }
public string county { get; set; }
public string postcode { get; set; }
//other fields as needed
}
public class Customer
{
public string _id { get; set; }
public string name { get; set; }
public string street_1 { get; set; }
public string street_2 { get; set; }
public string town { get; set; }
public string county { get; set; }
public string postcode { get; set; }
//other fields as needed
}
public class InvoiceItems
{
public string item_id { get; set; }
public string price_per_unit { get; set; }
public string quanity { get; set; }
public string date { get; set; }
}
public class WholeObject
{
public Customer customer { get; set; }
public Business address { get; set; }
public List<InvoiceItems> items { get; set; }
}
(naprawdę przykładowe zajęcia)
Czy istnieje jakieś ograniczenie inne niż 1 MB, aby wstawić to do tabeli? Czytałem dalejTableServiceEntity, który powinien mapować obiekty C #, ale czy będzie obsługiwał? Na tym etapie jest to bardzo hipotetyczne pytanie, ponieważ tak naprawdę nie próbowałem go zakodować. Każda pomoc byłaby doceniana.