Recent content by Ismael123

  1. I

    Dapper Extensions - Methods not accessible by MySqlConnection

    I found my mistake. I installed Dapper.Extensions instead of DapperExtensions
  2. I

    Dapper Extensions - Methods not accessible by MySqlConnection

    Hi I installed Dapper and Dapper extensions from the NuGet package Manager but I'm not able to use methods like Insert, Delete, etc... Is there something amiss in my project. I have a model using Dapper; namespace TBT.Models { publicclassCategory { publicintId{ get;set;}...
  3. I

    Add form in View at runtime

    Thanks it worked
  4. I

    Add form in View at runtime

    Thanks, it worked. Here is the solution. here is the link <li id="comment"><a href="#">Comment</a></li> then the form <div id="txtcomd" style="display:none"> @using (Html.BeginForm("comment", "post")) { @Html.TextArea("Comment")...
  5. I

    Add form in View at runtime

    i want a form containing a text bar to appear when comment is clicked <li><a href="#" id="comment">Comment</a></li> I couldnt do it using razor so I tried writing a Jquery script <script type="text/javascript"> $('#comment').click(function () { $('div#txtcmd').html...
  6. I

    Regular Expressions

    Hi, I wrote a regex to check a phone number format in my view-model but it always raises an error no matter how the number looks like. I want it to be in either of these 2 formats 05XXXXXXXXX 02XXXXXXXXX [DataType(DataType.PhoneNumber)]...
  7. I

    Nhibernate query throws NullReferenceException

    I found my mistake. Although I configure my database, I forgot to write the open and close session functions which are called for each query. public static void OpenSession() { HttpContext.Current.Items[SessionKey] = _sessionFactory.OpenSession(); }...
  8. I

    Nhibernate query throws NullReferenceException

    As you said, Database.Session returns null. I checked the connection strings but everything seems to be correct and I am mapping my models to their corresponding tables in the DB. I tried checking it again with a friend but we couldn't find the cause. What else can cause the session to return...
  9. I

    Nhibernate query throws NullReferenceException

    [CODE] [NullReferenceException: Object reference not set to an instance of an object.] NHibernate.Linq.LinqExtensionMethods.Query(ISession session) +44 HastaneRandevu.Controllers.AuthController.Login(AuthLogin form, String returnUrl) in C:\Visual Studio...
  10. I

    Nhibernate query throws NullReferenceException

    Hi, I added a register form and a database driven authentication to a project I'm working on. Since then, I get a null reference error without seeing any validation summary when I try log in. The same thing happens when i try opening the register page. But errors occur when the app is reading...
  11. I

    Synchronising threads

    Ive tried using a mutex, a synclock, and a monitor before posting here but I was only able to pause the first thread and finish the second one. I guess it is because this multithreading still confuses me. And I deleted all of this before posting in order to have a cleaner code. Maybe that's why...
  12. I

    Synchronising threads

    Why do you assume I didnt do any research?Almost everything I found was related to blocking other threads while one is working. I struggled with this question and several others but couldnt solve it. Icame here for some help because Im trying to learn. Just giving a hint will not magically solve...
  13. I

    Synchronising threads

    Im studying for a vb.net exams and 1 of the topics is threading. I tried solving many problems in vain and was hoping getting a hint or seeing the solution of this one will help me understand and solve other threading questions.And I really dont see how this reply of yours is suppose to be helpful
  14. I

    Synchronising threads

    I have a thread which appends a 100 "_" into a file and another one a 100 "-" into the same file. Any idea how to synchronise them in order to get an output like _-_-_- etc.. I guess the solution will be similar in C# Imports System.ThreadingImports System.IO Module Module1 Dim NesneMutex...
Top Bottom