tags:

views:

40

answers:

1

i have a very simple entity

    public class PortalStat
    {
        public virtual int ID { get; set; }
        public virtual Guid ProductGuid { get; set; }
        public virtual DateTime StatDateTime { get; set; }
        public virtual DM.Domain.Portal Portal { get; set; }
        public virtual int Count { get; set; }
    }

i would like to make a funtion which check if there is a entity based on the Portal and the StatDateTime. if the record exist then i would like to increase the Count otherwise i would like to insert a new record.

How do i do that in nhibernate

A: 

This post can help

ArsenMkrt