Exemplo n.º 1
0
        // this function for just referance for partial update field user have to create seperate function learn from this function.
        public bool UpdatePartial(ENT.MessageSendLog objEntity)
        {
            bool blnResult = false;

            try
            {
                //Create Fields List in dictionary
                Dictionary <string, bool> dctFields = new Dictionary <string, bool>();
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.MessageSendLog>(x => x.MessageLogId), true);
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.MessageSendLog>(x => x.Mobile), false);
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.MessageSendLog>(x => x.Response), false);
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.MessageSendLog>(x => x.IsSent), false);
                dctFields.Add(COM.HelperMethod.PropertyName <ENT.MessageSendLog>(x => x.CreatedDateTime), false);
                objEntity.FieldCollection = dctFields;
                if (objDAL.SaveChanges(objEntity.FieldCollection, objEntity))
                {
                    blnResult = true;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(blnResult);
        }
Exemplo n.º 2
0
        public object GetByPrimaryKey(ENT.MessageSendLog Entity)
        {
            object objResult = null;

            try
            {
                DAL.CRUDOperation tt = new DAL.CRUDOperation();
                objResult = tt.GetEntityByPrimartKey(Entity);
            }
            catch (Exception)
            {
                throw;
            }
            return(objResult);
        }