//------------------------------------------------------------------------------ // // This code was generated from a template. // // Manual changes to this file may cause unexpected behavior in your application. // Manual changes to this file will be overwritten if the code is regenerated. // //------------------------------------------------------------------------------ namespace Neo.Afx.Services.Comments.Entities { using System; using System.Data.Entity; using System.Data.Entity.Infrastructure; using System.Data.Entity.Core.Objects; using System.Linq; public partial class CommentContext : DbContext { public CommentContext() : base("name=CommentContext") { } protected override void OnModelCreating(DbModelBuilder modelBuilder) { throw new UnintentionalCodeFirstException(); } public virtual DbSet Comments { get; set; } public virtual DbSet CommentsUsers { get; set; } public virtual ObjectResult> Pr_CommentUpdate(Nullable commentID, string comment, string commentByUserName) { var commentIDParameter = commentID.HasValue ? new ObjectParameter("CommentID", commentID) : new ObjectParameter("CommentID", typeof(long)); var commentParameter = comment != null ? new ObjectParameter("Comment", comment) : new ObjectParameter("Comment", typeof(string)); var commentByUserNameParameter = commentByUserName != null ? new ObjectParameter("CommentByUserName", commentByUserName) : new ObjectParameter("CommentByUserName", typeof(string)); return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction>("Pr_CommentUpdate", commentIDParameter, commentParameter, commentByUserNameParameter); } public virtual ObjectResult> Pr_CommentDelete(Nullable commentID, string commentByUserName) { var commentIDParameter = commentID.HasValue ? new ObjectParameter("CommentID", commentID) : new ObjectParameter("CommentID", typeof(long)); var commentByUserNameParameter = commentByUserName != null ? new ObjectParameter("CommentByUserName", commentByUserName) : new ObjectParameter("CommentByUserName", typeof(string)); return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction>("Pr_CommentDelete", commentIDParameter, commentByUserNameParameter); } public virtual ObjectResult> Pr_CommentCreate(Nullable entityID, Nullable itemID, string comment, string commentByUserName) { var entityIDParameter = entityID.HasValue ? new ObjectParameter("EntityID", entityID) : new ObjectParameter("EntityID", typeof(int)); var itemIDParameter = itemID.HasValue ? new ObjectParameter("ItemID", itemID) : new ObjectParameter("ItemID", typeof(long)); var commentParameter = comment != null ? new ObjectParameter("Comment", comment) : new ObjectParameter("Comment", typeof(string)); var commentByUserNameParameter = commentByUserName != null ? new ObjectParameter("CommentByUserName", commentByUserName) : new ObjectParameter("CommentByUserName", typeof(string)); return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction>("Pr_CommentCreate", entityIDParameter, itemIDParameter, commentParameter, commentByUserNameParameter); } } }