当前位置: 首页>>代码示例>>C#>>正文


C# Objects.ObjectParameter类代码示例

本文整理汇总了C#中System.Data.Entity.Core.Objects.ObjectParameter的典型用法代码示例。如果您正苦于以下问题:C# ObjectParameter类的具体用法?C# ObjectParameter怎么用?C# ObjectParameter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ObjectParameter类属于System.Data.Entity.Core.Objects命名空间,在下文中一共展示了ObjectParameter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InsertFlower

        public virtual int InsertFlower(string maHoa, string tenHoa, Nullable<double> giaBan, Nullable<int> soLuong, string hinhAnh, string maChuDe, ObjectParameter error)
        {
            var maHoaParameter = maHoa != null ?
                new ObjectParameter("MaHoa", maHoa) :
                new ObjectParameter("MaHoa", typeof(string));

            var tenHoaParameter = tenHoa != null ?
                new ObjectParameter("TenHoa", tenHoa) :
                new ObjectParameter("TenHoa", typeof(string));

            var giaBanParameter = giaBan.HasValue ?
                new ObjectParameter("GiaBan", giaBan) :
                new ObjectParameter("GiaBan", typeof(double));

            var soLuongParameter = soLuong.HasValue ?
                new ObjectParameter("SoLuong", soLuong) :
                new ObjectParameter("SoLuong", typeof(int));

            var hinhAnhParameter = hinhAnh != null ?
                new ObjectParameter("HinhAnh", hinhAnh) :
                new ObjectParameter("HinhAnh", typeof(string));

            var maChuDeParameter = maChuDe != null ?
                new ObjectParameter("MaChuDe", maChuDe) :
                new ObjectParameter("MaChuDe", typeof(string));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("InsertFlower", maHoaParameter, tenHoaParameter, giaBanParameter, soLuongParameter, hinhAnhParameter, maChuDeParameter, error);
        }
开发者ID:levanhung93,项目名称:Thuoc,代码行数:28,代码来源:BanHoaEntity.Context.cs

示例2: SPCodeGlobalInsert

     public virtual int SPCodeGlobalInsert(string permissionCode, string codeValue, string parentCodeValue, string codeName, string memId, string regIP, ObjectParameter returnValue)
     {
         var permissionCodeParameter = permissionCode != null ?
             new ObjectParameter("permissionCode", permissionCode) :
             new ObjectParameter("permissionCode", typeof(string));
 
         var codeValueParameter = codeValue != null ?
             new ObjectParameter("codeValue", codeValue) :
             new ObjectParameter("codeValue", typeof(string));
 
         var parentCodeValueParameter = parentCodeValue != null ?
             new ObjectParameter("parentCodeValue", parentCodeValue) :
             new ObjectParameter("parentCodeValue", typeof(string));
 
         var codeNameParameter = codeName != null ?
             new ObjectParameter("codeName", codeName) :
             new ObjectParameter("codeName", typeof(string));
 
         var memIdParameter = memId != null ?
             new ObjectParameter("memId", memId) :
             new ObjectParameter("memId", typeof(string));
 
         var regIPParameter = regIP != null ?
             new ObjectParameter("regIP", regIP) :
             new ObjectParameter("regIP", typeof(string));
 
         return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("SPCodeGlobalInsert", permissionCodeParameter, codeValueParameter, parentCodeValueParameter, codeNameParameter, memIdParameter, regIPParameter, returnValue);
     }
开发者ID:i6020345,项目名称:lenscloth,代码行数:28,代码来源:ModelCodeGlobal.Context.cs

示例3: Insert

 /// <summary>
 /// Inserts the specified ticket detail.
 /// </summary>
 /// <param name="userId">The user identifier.</param>
 /// <param name="ticketDetail">The ticket detail.</param>
 /// <returns>
 /// Ticket Id.
 /// </returns>
 public int Insert(int? userId, string ticketDetail)
 {
     ObjectParameter ticketIdParameter = new ObjectParameter("TicketID", typeof(global::System.Int32));
     ticketIdParameter.Value = DBNull.Value;
     this.unitOfWork.Context.AddTicket(ticketDetail, userId, ticketIdParameter);
     return Convert.ToInt32(ticketIdParameter.Value, CultureInfo.CurrentCulture);
 }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:15,代码来源:TicketRepository.cs

示例4: PostComment

 /// <summary>
 /// Posts the comment.
 /// </summary>
 /// <param name="commentDetail">The comment detail.</param>
 /// <param name="userId">The user identifier.</param>
 /// <returns>comment id</returns>
 public int PostComment(string commentDetail, int userId)
 {
     ObjectParameter commentIdParameter = new ObjectParameter("CommentID", typeof(global::System.Int32));
     commentIdParameter.Value = DBNull.Value;
     this.unitOfWork.Context.AddTicketComment(commentDetail, userId, commentIdParameter);
     return Convert.ToInt32(commentIdParameter.Value, CultureInfo.CurrentCulture);
 }
开发者ID:JaipurAnkita,项目名称:mastercode,代码行数:13,代码来源:TicketRepository.cs

示例5: NewEvent

     public virtual int NewEvent(string name, Nullable<int> typeId, Nullable<System.DateTime> date, Nullable<System.DateTime> closingDate, Nullable<int> capacity, string place, string imageUrl, ObjectParameter id)
     {
         var nameParameter = name != null ?
             new ObjectParameter("Name", name) :
             new ObjectParameter("Name", typeof(string));
 
         var typeIdParameter = typeId.HasValue ?
             new ObjectParameter("TypeId", typeId) :
             new ObjectParameter("TypeId", typeof(int));
 
         var dateParameter = date.HasValue ?
             new ObjectParameter("Date", date) :
             new ObjectParameter("Date", typeof(System.DateTime));
 
         var closingDateParameter = closingDate.HasValue ?
             new ObjectParameter("ClosingDate", closingDate) :
             new ObjectParameter("ClosingDate", typeof(System.DateTime));
 
         var capacityParameter = capacity.HasValue ?
             new ObjectParameter("Capacity", capacity) :
             new ObjectParameter("Capacity", typeof(int));
 
         var placeParameter = place != null ?
             new ObjectParameter("Place", place) :
             new ObjectParameter("Place", typeof(string));
 
         var imageUrlParameter = imageUrl != null ?
             new ObjectParameter("ImageUrl", imageUrl) :
             new ObjectParameter("ImageUrl", typeof(string));
 
         return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("NewEvent", nameParameter, typeIdParameter, dateParameter, closingDateParameter, capacityParameter, placeParameter, imageUrlParameter, id);
     }
开发者ID:tykamara,项目名称:ephec-projet_web,代码行数:32,代码来源:EventModel.Context.cs

示例6: T_Alarms_ADD

     public virtual int T_Alarms_ADD(ObjectParameter id, Nullable<int> statId, Nullable<int> devId, Nullable<short> dustType, Nullable<double> faultVal, Nullable<System.DateTime> updateTime, string country)
     {
         var statIdParameter = statId.HasValue ?
             new ObjectParameter("StatId", statId) :
             new ObjectParameter("StatId", typeof(int));
 
         var devIdParameter = devId.HasValue ?
             new ObjectParameter("DevId", devId) :
             new ObjectParameter("DevId", typeof(int));
 
         var dustTypeParameter = dustType.HasValue ?
             new ObjectParameter("DustType", dustType) :
             new ObjectParameter("DustType", typeof(short));
 
         var faultValParameter = faultVal.HasValue ?
             new ObjectParameter("FaultVal", faultVal) :
             new ObjectParameter("FaultVal", typeof(double));
 
         var updateTimeParameter = updateTime.HasValue ?
             new ObjectParameter("UpdateTime", updateTime) :
             new ObjectParameter("UpdateTime", typeof(System.DateTime));
 
         var countryParameter = country != null ?
             new ObjectParameter("Country", country) :
             new ObjectParameter("Country", typeof(string));
 
         return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("T_Alarms_ADD", id, statIdParameter, devIdParameter, dustTypeParameter, faultValParameter, updateTimeParameter, countryParameter);
     }
开发者ID:autyan,项目名称:SHEP_Platform,代码行数:28,代码来源:ESMonitor.Context.cs

示例7: AddClient

        /* 
         * Nombre      :    AddClient
         * Descripción :    Agregar un registro de cliente, tarjetas y cuentas. 
         * Parámetros  :    string numdoc, string name, string phone, string address
         */
        public Response AddClient(string numdoc, string name, string phone, string address)
        {

            using (CardsEntities context = new CardsEntities())
            {

                string resCode = "1";
                string resDetail = "Excepción: ";
                string resSource = SERVICE_NAME + String.Format("AddClient(string numdoc={0}, string name={1}, string phone={2}, string address={3})", numdoc , name , phone , address);

                ObjectParameter respuesta = new ObjectParameter("response", typeof(int));

                if (numdoc != null && name != null && phone != null && address != null)
                {
                    context.PLZ_ADD_CLIENTE(numdoc, name, phone, address, respuesta);
                    resCode = respuesta.Value.ToString();
                }

                resDetail = getExcepcionDetail(resCode);

                return new Response() { excode = resCode, exdetail = resDetail, exsource = resSource };

            }

        }
开发者ID:ddepablos,项目名称:CardsREST,代码行数:30,代码来源:ServiceCards.svc.cs

示例8: ParameterTest

     public virtual int ParameterTest(byte[] binary, Nullable<bool> @bool, Nullable<System.DateTime> dateTime, Nullable<decimal> @decimal, Nullable<double> @float, Nullable<System.Guid> guid, ObjectParameter @int, ObjectParameter @string)
     {
         var binaryParameter = binary != null ?
             new ObjectParameter("binary", binary) :
             new ObjectParameter("binary", typeof(byte[]));
 
         var boolParameter = @bool.HasValue ?
             new ObjectParameter("bool", @bool) :
             new ObjectParameter("bool", typeof(bool));
 
         var dateTimeParameter = dateTime.HasValue ?
             new ObjectParameter("dateTime", dateTime) :
             new ObjectParameter("dateTime", typeof(System.DateTime));
 
         var decimalParameter = @decimal.HasValue ?
             new ObjectParameter("decimal", @decimal) :
             new ObjectParameter("decimal", typeof(decimal));
 
         var floatParameter = @float.HasValue ?
             new ObjectParameter("float", @float) :
             new ObjectParameter("float", typeof(double));
 
         var guidParameter = guid.HasValue ?
             new ObjectParameter("guid", guid) :
             new ObjectParameter("guid", typeof(System.Guid));
 
         return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("ParameterTest", binaryParameter, boolParameter, dateTimeParameter, decimalParameter, floatParameter, guidParameter, @int, @string);
     }
开发者ID:christiandpena,项目名称:entityframework,代码行数:28,代码来源:CsMonsterModel.Context.cs

示例9: CallStoredProc

 private static void CallStoredProc() {
     using (AutoLotEntities context = new AutoLotEntities()) {
         ObjectParameter outParam = new ObjectParameter("petName", typeof(string));
         context.GetPetName(83, outParam);
         Console.WriteLine(outParam.Value);
     }
 }
开发者ID:Geronimobile,项目名称:DotNetExamIntro,代码行数:7,代码来源:Program.cs

示例10: GetPetName

     public virtual int GetPetName(Nullable<int> carID, ObjectParameter petName)
     {
         var carIDParameter = carID.HasValue ?
             new ObjectParameter("carID", carID) :
             new ObjectParameter("carID", typeof(int));
 
         return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetPetName", carIDParameter, petName);
     }
开发者ID:Geronimobile,项目名称:DotNetExamIntro,代码行数:8,代码来源:AutoLotDAL_EF.Context.cs

示例11: aspnet_Applications_CreateApplication

        public virtual int aspnet_Applications_CreateApplication(string applicationName, ObjectParameter applicationId)
        {
            var applicationNameParameter = applicationName != null ?
                new ObjectParameter("ApplicationName", applicationName) :
                new ObjectParameter("ApplicationName", typeof(string));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("aspnet_Applications_CreateApplication", applicationNameParameter, applicationId);
        }
开发者ID:WeakFallenMan,项目名称:Only10,代码行数:8,代码来源:Only10dataBaseModel.Context.cs

示例12: sp_GenerateRandomString

        public virtual int sp_GenerateRandomString(Nullable<int> sLength, ObjectParameter randomString)
        {
            var sLengthParameter = sLength.HasValue ?
                new ObjectParameter("sLength", sLength) :
                new ObjectParameter("sLength", typeof(int));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("sp_GenerateRandomString", sLengthParameter, randomString);
        }
开发者ID:romkokarpo,项目名称:TravFriends,代码行数:8,代码来源:TravelFriendsModel.Context.cs

示例13: GetHashCode

        public virtual int GetHashCode(string input, ObjectParameter hash)
        {
            var inputParameter = input != null ?
                new ObjectParameter("input", input) :
                new ObjectParameter("input", typeof(string));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetHashCode", inputParameter, hash);
        }
开发者ID:zdhuka,项目名称:PieAnalytics,代码行数:8,代码来源:PieAnalytics.Context.cs

示例14: usp_AddEventFilter

        public virtual int usp_AddEventFilter(string eventFilter, ObjectParameter guid)
        {
            var eventFilterParameter = eventFilter != null ?
                new ObjectParameter("EventFilter", eventFilter) :
                new ObjectParameter("EventFilter", typeof(string));

            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_AddEventFilter", eventFilterParameter, guid);
        }
开发者ID:affans,项目名称:Calendar-System,代码行数:8,代码来源:EventOrganizer.Context.cs

示例15: addAgentController

        /// <summary>
        /// Allow create a new agent
        /// </summary>
        /// <param name="model"> Objet type ModelAgent</param>
        /// <param name="prmOutIdAgent">New id agent record</param>
        /// <param name="prmOutResult">Result the process created</param>
        public void addAgentController(AgentModel model, ref ObjectParameter  prmOutIdAgent, ref ObjectParameter  prmOutResult)
        {

            int res = 0;
            Repository<AGENT> objInsert = new Repository<AGENT>();

            //Repository<AgentInsert> objInsert = new Repository<AgentInsert>();
            DGSDATAEntities entities = new DGSDATAEntities();
            try
            {

                res = entities.Agent_Insert(
                    model.Enable,
                    model.DontXferPlayerActivity, //prmDontXfer
                    model.IsDistributor,
                    model.IdUser,   // prmIdUser,
                    model.Distributor,
                    model.Makeup, 
                    model.CommSports,
                    model.CommCasino,
                    model.CommHorses,
                    model.PerHeadSports,
                    model.PerHeadCasino,
                    model.PerHeadHorses,
                    model.IdAgentType,
                    model.IdCurrency,
                    model.IdBook,
                    model.IdGrouping,
                    model.Agent,
                    model.Name,
                    model.Password,
                    model.City,
                    model.State,
                    model.Country,
                    model.Address1,
                    model.Address2,
                    model.Email,
                    model.Phone,
                    model.Fax,
                    model.Zip,
                    model.OnlineAccess,
                    model.OnlineMessage,
                    model.IdLineType,
                    prmOutIdAgent,
                    prmOutResult);

                   //object obj = new object[] { prmOutIdAgent, prmOutResult };

                //return obj;
            }
            catch 
            {
                throw;
            }

           
            
        }
开发者ID:cesarsan7,项目名称:Source,代码行数:64,代码来源:AgentController.cs


注:本文中的System.Data.Entity.Core.Objects.ObjectParameter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。