/// <summary> /// Deprecated Method for adding a new object to the restaurants_posts EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTorestaurants_posts(restaurants_posts restaurants_posts) { base.AddObject("restaurants_posts", restaurants_posts); }
public void SetRestaurantComment(int restaurantId, string comment, int status) { OperationContext context = OperationContext.Current; MessageProperties messageProperties = context.IncomingMessageProperties; RemoteEndpointMessageProperty endpointProperty = messageProperties[RemoteEndpointMessageProperty.Name] as RemoteEndpointMessageProperty; restaurants_posts post = new restaurants_posts(); post.restaurant_id = restaurantId; post.comment = comment; post.status_id = status; post.date = DateTime.Now; post.ip = endpointProperty.Address; restaurantDao.setComment(post); }
/// <summary> /// Create a new restaurants_posts object. /// </summary> /// <param name="id">Initial value of the id property.</param> /// <param name="restaurant_id">Initial value of the restaurant_id property.</param> /// <param name="status_id">Initial value of the status_id property.</param> /// <param name="date">Initial value of the date property.</param> public static restaurants_posts Createrestaurants_posts(global::System.Int32 id, global::System.Int32 restaurant_id, global::System.Int32 status_id, global::System.DateTime date) { restaurants_posts restaurants_posts = new restaurants_posts(); restaurants_posts.id = id; restaurants_posts.restaurant_id = restaurant_id; restaurants_posts.status_id = status_id; restaurants_posts.date = date; return restaurants_posts; }
public void setComment(restaurants_posts comment) { contexto.AddTorestaurants_posts(comment); contexto.SaveChanges(); }