Exemplo n.º 1
0
 /// <summary>
 /// Create a new ServiceCategory object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="title">Initial value of the Title property.</param>
 public static ServiceCategory CreateServiceCategory(global::System.Int32 id, global::System.String title)
 {
     ServiceCategory serviceCategory = new ServiceCategory();
     serviceCategory.Id = id;
     serviceCategory.Title = title;
     return serviceCategory;
 }
Exemplo n.º 2
0
 public static Service[] GetServicesByCategory(ServiceCategory selectedCategory)
 {
     EntityModelContainer context = GetContext();
     return context.Services.Execute(MergeOption.OverwriteChanges)
         .Where(s => s.ServiceCategoryRelations.Any
             (sc => (sc.ServiceCategoryId == selectedCategory.Id) || (selectedCategory.Id == 0))).ToArray();
 }
Exemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ServiceCategories EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToServiceCategories(ServiceCategory serviceCategory)
 {
     base.AddObject("ServiceCategories", serviceCategory);
 }